generated-configure.sh revision 2595:aa3c97810d7c
11956Scsgr#!/bin/bash
21956Scsgr#
31956Scsgr# ##########################################################
41956Scsgr# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
51956Scsgr# ##########################################################
61956Scsgr#
71959Scsgr#! /bin/sh
851461Smarkm# Guess values for system-dependent variables and create Makefiles.
91959Scsgr# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
101959Scsgr#
1151461Smarkm# Report bugs to <build-dev@openjdk.java.net>.
1251461Smarkm#
1351461Smarkm#
1451461Smarkm# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
151956Scsgr#
161956Scsgr#
171956Scsgr# This configure script is free software; the Free Software Foundation
181956Scsgr# gives unlimited permission to copy, distribute and modify it.
191956Scsgr## -------------------- ##
201956Scsgr## M4sh Initialization. ##
211956Scsgr## -------------------- ##
221956Scsgr
2351461Smarkm# Be more Bourne compatible
241956ScsgrDUALCASE=1; export DUALCASE # for MKS sh
251956Scsgrif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
261956Scsgr  emulate sh
271956Scsgr  NULLCMD=:
281956Scsgr  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
291956Scsgr  # is contrary to our usage.  Disable this feature.
301956Scsgr  alias -g '${1+"$@"}'='"$@"'
311956Scsgr  setopt NO_GLOB_SUBST
321956Scsgrelse
331956Scsgr  case `(set -o) 2>/dev/null` in #(
341956Scsgr  *posix*) :
351956Scsgr    set -o posix ;; #(
361956Scsgr  *) :
371956Scsgr     ;;
381956Scsgresac
391956Scsgrfi
401956Scsgr
411956Scsgr
421956Scsgras_nl='
431956Scsgr'
441956Scsgrexport as_nl
451956Scsgr# Printing a long string crashes Solaris 7 /usr/bin/printf.
461956Scsgras_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
471956Scsgras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
481956Scsgras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
491956Scsgr# Prefer a ksh shell builtin over an external printf program on Solaris,
501956Scsgr# but without wasting forks for bash or zsh.
511956Scsgrif test -z "$BASH_VERSION$ZSH_VERSION" \
521956Scsgr    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
531956Scsgr  as_echo='print -r --'
541956Scsgr  as_echo_n='print -rn --'
5551461Smarkmelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
561956Scsgr  as_echo='printf %s\n'
571956Scsgr  as_echo_n='printf %s'
5885358Speterelse
5985358Speter  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6085358Speter    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6185358Speter    as_echo_n='/usr/ucb/echo -n'
621956Scsgr  else
631956Scsgr    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6490868Smike    as_echo_n_body='eval
651956Scsgr      arg=$1;
6612884Smarkm      case $arg in #(
6751461Smarkm      *"$as_nl"*)
681956Scsgr	expr "X$arg" : "X\\(.*\\)$as_nl";
691959Scsgr	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7091754Smarkm      esac;
711959Scsgr      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7291754Smarkm    '
7391754Smarkm    export as_echo_n_body
741959Scsgr    as_echo_n='sh -c $as_echo_n_body as_echo'
751956Scsgr  fi
761959Scsgr  export as_echo_body
771956Scsgr  as_echo='sh -c $as_echo_body as_echo'
781956Scsgrfi
791956Scsgr
801956Scsgr# The user is always right.
811956Scsgrif test "${PATH_SEPARATOR+set}" != set; then
821956Scsgr  PATH_SEPARATOR=:
831956Scsgr  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
841956Scsgr    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
851956Scsgr      PATH_SEPARATOR=';'
861956Scsgr  }
871956Scsgrfi
881956Scsgr
891956Scsgr
901956Scsgr# IFS
911956Scsgr# We need space, tab and new line, in precisely that order.  Quoting is
921956Scsgr# there to prevent editors from complaining about space-tab.
931956Scsgr# (If _AS_PATH_WALK were called with IFS unset, it would disable word
941956Scsgr# splitting by setting IFS to empty value.)
951956ScsgrIFS=" ""	$as_nl"
961956Scsgr
971956Scsgr# Find who we are.  Look in the path if we contain no directory separator.
981956Scsgras_myself=
991956Scsgrcase $0 in #((
1001956Scsgr  *[\\/]* ) as_myself=$0 ;;
1011956Scsgr  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1021956Scsgrfor as_dir in $PATH
1031956Scsgrdo
1041956Scsgr  IFS=$as_save_IFS
1051956Scsgr  test -z "$as_dir" && as_dir=.
1061956Scsgr    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
1071956Scsgr  done
1081956ScsgrIFS=$as_save_IFS
1091956Scsgr
1101956Scsgr     ;;
1111956Scsgresac
1121956Scsgr# We did not find ourselves, most probably we were run as `sh COMMAND'
1131956Scsgr# in which case we are not to be found in the path.
1141956Scsgrif test "x$as_myself" = x; then
1151956Scsgr  as_myself=$0
1161956Scsgrfi
1171956Scsgrif test ! -f "$as_myself"; then
1181956Scsgr  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
1191956Scsgr  exit 1
1201956Scsgrfi
1211956Scsgr
1221956Scsgr# Unset variables that we do not need and which cause bugs (e.g. in
1231956Scsgr# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
1241956Scsgr# suppresses any "Segmentation fault" message there.  '((' could
1251956Scsgr# trigger a bug in pdksh 5.2.14.
1261956Scsgrfor as_var in BASH_ENV ENV MAIL MAILPATH
1271956Scsgrdo eval test x\${$as_var+set} = xset \
1281956Scsgr  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
1291956Scsgrdone
1301956ScsgrPS1='$ '
1311956ScsgrPS2='> '
1321956ScsgrPS4='+ '
1331956Scsgr
1341956Scsgr# NLS nuisances.
1351956ScsgrLC_ALL=C
1361956Scsgrexport LC_ALL
1371956ScsgrLANGUAGE=C
1381956Scsgrexport LANGUAGE
1391956Scsgr
1401956Scsgr# CDPATH.
1411956Scsgr(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1421956Scsgr
1431956Scsgr# Use a proper internal environment variable to ensure we don't fall
1441956Scsgr  # into an infinite loop, continuously re-executing ourselves.
1451956Scsgr  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
1461956Scsgr    _as_can_reexec=no; export _as_can_reexec;
1471956Scsgr    # We cannot yet assume a decent shell, so we have to provide a
1481956Scsgr# neutralization value for shells without unset; and this also
1491956Scsgr# works around shells that cannot unset nonexistent variables.
1501956Scsgr# Preserve -v and -x to the replacement shell.
1511956ScsgrBASH_ENV=/dev/null
1521956ScsgrENV=/dev/null
1531956Scsgr(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
1541956Scsgrcase $- in # ((((
1551956Scsgr  *v*x* | *x*v* ) as_opts=-vx ;;
1561956Scsgr  *v* ) as_opts=-v ;;
1571956Scsgr  *x* ) as_opts=-x ;;
1581956Scsgr  * ) as_opts= ;;
1591956Scsgresac
1601956Scsgrexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
1611956Scsgr# Admittedly, this is quite paranoid, since all the known shells bail
1621956Scsgr# out after a failed `exec'.
1631956Scsgr$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
1641956Scsgras_fn_exit 255
1651956Scsgr  fi
16651461Smarkm  # We don't want this to propagate to other subprocesses.
1671956Scsgr          { _as_can_reexec=; unset _as_can_reexec;}
1681956Scsgrif test "x$CONFIG_SHELL" = x; then
1691956Scsgr  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
1701956Scsgr  emulate sh
1711956Scsgr  NULLCMD=:
1721956Scsgr  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
1731956Scsgr  # is contrary to our usage.  Disable this feature.
1741956Scsgr  alias -g '\${1+\"\$@\"}'='\"\$@\"'
1751956Scsgr  setopt NO_GLOB_SUBST
1761956Scsgrelse
1771956Scsgr  case \`(set -o) 2>/dev/null\` in #(
1781956Scsgr  *posix*) :
1791956Scsgr    set -o posix ;; #(
18051461Smarkm  *) :
18191754Smarkm     ;;
18251461Smarkmesac
18351461Smarkmfi
18451461Smarkm"
18551461Smarkm  as_required="as_fn_return () { (exit \$1); }
18651461Smarkmas_fn_success () { as_fn_return 0; }
18751461Smarkmas_fn_failure () { as_fn_return 1; }
18851461Smarkmas_fn_ret_success () { return 0; }
18951461Smarkmas_fn_ret_failure () { return 1; }
19051461Smarkm
19151461Smarkmexitcode=0
19251461Smarkmas_fn_success || { exitcode=1; echo as_fn_success failed.; }
19351461Smarkmas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
1941956Scsgras_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
1951956Scsgras_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
1961956Scsgrif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
1971956Scsgr
1981956Scsgrelse
1991956Scsgr  exitcode=1; echo positional parameters were not saved.
2001959Scsgrfi
2011956Scsgrtest x\$exitcode = x0 || exit 1
2021956Scsgrtest -x / || exit 1"
2031956Scsgr  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
2041956Scsgr  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
2051956Scsgr  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
2061956Scsgr  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
2071956Scsgrtest \$(( 1 + 1 )) = 2 || exit 1"
2081956Scsgr  if (eval "$as_required") 2>/dev/null; then :
2091956Scsgr  as_have_required=yes
2101956Scsgrelse
2111956Scsgr  as_have_required=no
2121956Scsgrfi
2131956Scsgr  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
2141956Scsgr
2151956Scsgrelse
2161956Scsgr  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2171956Scsgras_found=false
2181956Scsgrfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
21991754Smarkmdo
2201956Scsgr  IFS=$as_save_IFS
2211956Scsgr  test -z "$as_dir" && as_dir=.
22251461Smarkm  as_found=:
2231956Scsgr  case $as_dir in #(
2241956Scsgr	 /*)
2251956Scsgr	   for as_base in sh bash ksh sh5; do
2261956Scsgr	     # Try only shells that exist, to save several forks.
2271956Scsgr	     as_shell=$as_dir/$as_base
2281956Scsgr	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
2291956Scsgr		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
2301956Scsgr  CONFIG_SHELL=$as_shell as_have_required=yes
2311956Scsgr		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
2321956Scsgr  break 2
2331956Scsgrfi
2341956Scsgrfi
2351956Scsgr	   done;;
2361956Scsgr       esac
2371956Scsgr  as_found=false
2381956Scsgrdone
2391956Scsgr$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
2401956Scsgr	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
2411956Scsgr  CONFIG_SHELL=$SHELL as_have_required=yes
2421956Scsgrfi; }
2431956ScsgrIFS=$as_save_IFS
2441956Scsgr
2451956Scsgr
24691754Smarkm      if test "x$CONFIG_SHELL" != x; then :
24791754Smarkm  export CONFIG_SHELL
2481956Scsgr             # We cannot yet assume a decent shell, so we have to provide a
2491956Scsgr# neutralization value for shells without unset; and this also
2501956Scsgr# works around shells that cannot unset nonexistent variables.
2511956Scsgr# Preserve -v and -x to the replacement shell.
2521956ScsgrBASH_ENV=/dev/null
2531956ScsgrENV=/dev/null
25491754Smarkm(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
2551956Scsgrcase $- in # ((((
2561956Scsgr  *v*x* | *x*v* ) as_opts=-vx ;;
2571956Scsgr  *v* ) as_opts=-v ;;
2581956Scsgr  *x* ) as_opts=-x ;;
2591956Scsgr  * ) as_opts= ;;
2601956Scsgresac
2611956Scsgrexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
2621956Scsgr# Admittedly, this is quite paranoid, since all the known shells bail
26391754Smarkm# out after a failed `exec'.
2641956Scsgr$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
2651956Scsgrexit 255
2661956Scsgrfi
2671956Scsgr
2681956Scsgr    if test x$as_have_required = xno; then :
2691956Scsgr  $as_echo "$0: This script requires a shell more modern than all"
2701956Scsgr  $as_echo "$0: the shells that I found on your system."
27191754Smarkm  if test x${ZSH_VERSION+set} = xset ; then
2721956Scsgr    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
2731956Scsgr    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
2741956Scsgr  else
2751956Scsgr    $as_echo "$0: Please tell bug-autoconf@gnu.org and
2761956Scsgr$0: build-dev@openjdk.java.net about your system, including
2771956Scsgr$0: any error possibly output before this message. Then
2781956Scsgr$0: install a modern shell, or manually run the script
2791956Scsgr$0: under such a shell if you do have one."
2801956Scsgr  fi
2811956Scsgr  exit 1
2821956Scsgrfi
2831956Scsgrfi
2841956Scsgrfi
2851956ScsgrSHELL=${CONFIG_SHELL-/bin/sh}
2861956Scsgrexport SHELL
2871956Scsgr# Unset more variables known to interfere with behavior of common tools.
2881956ScsgrCLICOLOR_FORCE= GREP_OPTIONS=
2891956Scsgrunset CLICOLOR_FORCE GREP_OPTIONS
2901956Scsgr
2911956Scsgr## --------------------- ##
2921956Scsgr## M4sh Shell Functions. ##
2931956Scsgr## --------------------- ##
2941956Scsgr# as_fn_unset VAR
2951956Scsgr# ---------------
2961956Scsgr# Portably unset VAR.
2971956Scsgras_fn_unset ()
2981956Scsgr{
2991956Scsgr  { eval $1=; unset $1;}
3001956Scsgr}
3011956Scsgras_unset=as_fn_unset
3021956Scsgr
3031956Scsgr# as_fn_set_status STATUS
3041956Scsgr# -----------------------
3051956Scsgr# Set $? to STATUS, without forking.
3061956Scsgras_fn_set_status ()
3071956Scsgr{
3081956Scsgr  return $1
3091956Scsgr} # as_fn_set_status
3101956Scsgr
3111956Scsgr# as_fn_exit STATUS
3121956Scsgr# -----------------
3131956Scsgr# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
3141956Scsgras_fn_exit ()
3151956Scsgr{
3161956Scsgr  set +e
3171956Scsgr  as_fn_set_status $1
3181956Scsgr  exit $1
3191956Scsgr} # as_fn_exit
3201956Scsgr
3211956Scsgr# as_fn_mkdir_p
3221956Scsgr# -------------
3231956Scsgr# Create "$as_dir" as a directory, including parents if necessary.
3241956Scsgras_fn_mkdir_p ()
3251956Scsgr{
3261956Scsgr
3271956Scsgr  case $as_dir in #(
3281956Scsgr  -*) as_dir=./$as_dir;;
3291956Scsgr  esac
3308871Srgrimes  test -d "$as_dir" || eval $as_mkdir_p || {
3311956Scsgr    as_dirs=
3321956Scsgr    while :; do
33391754Smarkm      case $as_dir in #(
3341956Scsgr      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
3351956Scsgr      *) as_qdir=$as_dir;;
3361956Scsgr      esac
3371956Scsgr      as_dirs="'$as_qdir' $as_dirs"
3381956Scsgr      as_dir=`$as_dirname -- "$as_dir" ||
3391956Scsgr$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
3401956Scsgr	 X"$as_dir" : 'X\(//\)[^/]' \| \
3411956Scsgr	 X"$as_dir" : 'X\(//\)$' \| \
3421956Scsgr	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
3431956Scsgr$as_echo X"$as_dir" |
3441956Scsgr    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
3451956Scsgr	    s//\1/
3461956Scsgr	    q
3471956Scsgr	  }
34891754Smarkm	  /^X\(\/\/\)[^/].*/{
3491956Scsgr	    s//\1/
35051461Smarkm	    q
35151461Smarkm	  }
3521956Scsgr	  /^X\(\/\/\)$/{
3531956Scsgr	    s//\1/
3541956Scsgr	    q
3551956Scsgr	  }
3561956Scsgr	  /^X\(\/\).*/{
3571956Scsgr	    s//\1/
3581956Scsgr	    q
3591956Scsgr	  }
3601956Scsgr	  s/.*/./; q'`
3611956Scsgr      test -d "$as_dir" && break
3621956Scsgr    done
3631956Scsgr    test -z "$as_dirs" || eval "mkdir $as_dirs"
3641956Scsgr  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
3651956Scsgr
3661956Scsgr
3671956Scsgr} # as_fn_mkdir_p
3682539Spst
3691956Scsgr# as_fn_executable_p FILE
3701956Scsgr# -----------------------
37151461Smarkm# Test if FILE is an executable regular file.
37251461Smarkmas_fn_executable_p ()
3731956Scsgr{
3741956Scsgr  test -f "$1" && test -x "$1"
3751956Scsgr} # as_fn_executable_p
3761956Scsgr# as_fn_append VAR VALUE
37791754Smarkm# ----------------------
37891754Smarkm# Append the text in VALUE to the end of the definition contained in VAR. Take
3791956Scsgr# advantage of any shell optimizations that allow amortized linear growth over
3801956Scsgr# repeated appends, instead of the typical quadratic growth present in naive
3811956Scsgr# implementations.
3821956Scsgrif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
3831956Scsgr  eval 'as_fn_append ()
3841956Scsgr  {
3851956Scsgr    eval $1+=\$2
3861956Scsgr  }'
3871956Scsgrelse
3881956Scsgr  as_fn_append ()
3891956Scsgr  {
3901956Scsgr    eval $1=\$$1\$2
3911956Scsgr  }
3921956Scsgrfi # as_fn_append
3931956Scsgr
3941956Scsgr# as_fn_arith ARG...
3951956Scsgr# ------------------
3961956Scsgr# Perform arithmetic evaluation on the ARGs, and store the result in the
3971956Scsgr# global $as_val. Take advantage of shells that can avoid forks. The arguments
3981956Scsgr# must be portable across $(()) and expr.
3991956Scsgrif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
4001956Scsgr  eval 'as_fn_arith ()
4011956Scsgr  {
4021956Scsgr    as_val=$(( $* ))
4031956Scsgr  }'
4041956Scsgrelse
4051956Scsgr  as_fn_arith ()
4061956Scsgr  {
4071956Scsgr    as_val=`expr "$@" || test $? -eq 1`
4081956Scsgr  }
4091956Scsgrfi # as_fn_arith
4101956Scsgr
4111956Scsgr
4121956Scsgr# as_fn_error STATUS ERROR [LINENO LOG_FD]
4131956Scsgr# ----------------------------------------
4141956Scsgr# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
4151956Scsgr# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
4161956Scsgr# script with STATUS, using 1 if that was 0.
4171956Scsgras_fn_error ()
41851461Smarkm{
4191956Scsgr  as_status=$1; test $as_status -eq 0 && as_status=1
4201956Scsgr  if test "$4"; then
4211956Scsgr    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4221956Scsgr    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
4231956Scsgr  fi
4241956Scsgr  $as_echo "$as_me: error: $2" >&2
4258871Srgrimes  as_fn_exit $as_status
4261956Scsgr} # as_fn_error
4271956Scsgr
4281956Scsgrif expr a : '\(a\)' >/dev/null 2>&1 &&
4291956Scsgr   test "X`expr 00001 : '.*\(...\)'`" = X001; then
4301956Scsgr  as_expr=expr
4311956Scsgrelse
4321956Scsgr  as_expr=false
4331956Scsgrfi
4341956Scsgr
4351956Scsgrif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
4361956Scsgr  as_basename=basename
4371956Scsgrelse
4381956Scsgr  as_basename=false
4391956Scsgrfi
4401956Scsgr
4411956Scsgrif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
4421956Scsgr  as_dirname=dirname
4431956Scsgrelse
4441956Scsgr  as_dirname=false
4451956Scsgrfi
4461956Scsgr
4471956Scsgras_me=`$as_basename -- "$0" ||
4481956Scsgr$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
44951461Smarkm	 X"$0" : 'X\(//\)$' \| \
4501956Scsgr	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
4511956Scsgr$as_echo X/"$0" |
4521956Scsgr    sed '/^.*\/\([^/][^/]*\)\/*$/{
4531956Scsgr	    s//\1/
45451461Smarkm	    q
45551461Smarkm	  }
45651461Smarkm	  /^X\/\(\/\/\)$/{
4571956Scsgr	    s//\1/
4581956Scsgr	    q
4591956Scsgr	  }
4601956Scsgr	  /^X\/\(\/\).*/{
4611956Scsgr	    s//\1/
4621956Scsgr	    q
4631956Scsgr	  }
4641956Scsgr	  s/.*/./; q'`
4651956Scsgr
4661956Scsgr# Avoid depending upon Character Ranges.
4671956Scsgras_cr_letters='abcdefghijklmnopqrstuvwxyz'
4681956Scsgras_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
4691956Scsgras_cr_Letters=$as_cr_letters$as_cr_LETTERS
4701956Scsgras_cr_digits='0123456789'
4711956Scsgras_cr_alnum=$as_cr_Letters$as_cr_digits
4721956Scsgr
4731956Scsgr
4741956Scsgr  as_lineno_1=$LINENO as_lineno_1a=$LINENO
4751956Scsgr  as_lineno_2=$LINENO as_lineno_2a=$LINENO
4761956Scsgr  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
4771956Scsgr  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
4781956Scsgr  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
4791956Scsgr  sed -n '
4801956Scsgr    p
4811956Scsgr    /[$]LINENO/=
4821956Scsgr  ' <$as_myself |
4831956Scsgr    sed '
4841956Scsgr      s/[$]LINENO.*/&-/
4851956Scsgr      t lineno
4861956Scsgr      b
4871956Scsgr      :lineno
4881956Scsgr      N
4891956Scsgr      :loop
4901956Scsgr      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
4911956Scsgr      t loop
4921956Scsgr      s/-\n.*//
4931956Scsgr    ' >$as_me.lineno &&
4941956Scsgr  chmod +x "$as_me.lineno" ||
4951956Scsgr    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
4961956Scsgr
4971956Scsgr  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
4981956Scsgr  # already done that, so ensure we don't try to do so again and fall
4991956Scsgr  # in an infinite loop.  This has already happened in practice.
5001956Scsgr  _as_can_reexec=no; export _as_can_reexec
5011956Scsgr  # Don't try to exec as it changes $[0], causing all sort of problems
5021956Scsgr  # (the dirname of $[0] is not the place where we might find the
5031956Scsgr  # original and so on.  Autoconf is especially sensitive to this).
5041956Scsgr  . "./$as_me.lineno"
5051956Scsgr  # Exit status is that of the last command.
5061956Scsgr  exit
5071956Scsgr}
5081956Scsgr
5091956ScsgrECHO_C= ECHO_N= ECHO_T=
5101956Scsgrcase `echo -n x` in #(((((
5111956Scsgr-n*)
5121956Scsgr  case `echo 'xy\c'` in
5131956Scsgr  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
5141956Scsgr  xy)  ECHO_C='\c';;
5151956Scsgr  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
5161956Scsgr       ECHO_T='	';;
5171956Scsgr  esac;;
5181956Scsgr*)
5191956Scsgr  ECHO_N='-n';;
5201956Scsgresac
5211956Scsgr
5221956Scsgrrm -f conf$$ conf$$.exe conf$$.file
5231956Scsgrif test -d conf$$.dir; then
5241956Scsgr  rm -f conf$$.dir/conf$$.file
5251956Scsgrelse
5261956Scsgr  rm -f conf$$.dir
5271956Scsgr  mkdir conf$$.dir 2>/dev/null
5281956Scsgrfi
5291956Scsgrif (echo >conf$$.file) 2>/dev/null; then
5301956Scsgr  if ln -s conf$$.file conf$$ 2>/dev/null; then
5311956Scsgr    as_ln_s='ln -s'
5321956Scsgr    # ... but there are two gotchas:
5331956Scsgr    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
5341956Scsgr    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
5351956Scsgr    # In both cases, we have to default to `cp -pR'.
5361956Scsgr    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
5371956Scsgr      as_ln_s='cp -pR'
5381956Scsgr  elif ln conf$$.file conf$$ 2>/dev/null; then
5391956Scsgr    as_ln_s=ln
5401956Scsgr  else
5411956Scsgr    as_ln_s='cp -pR'
5421956Scsgr  fi
5431956Scsgrelse
5441956Scsgr  as_ln_s='cp -pR'
5451956Scsgrfi
5461956Scsgrrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
5471956Scsgrrmdir conf$$.dir 2>/dev/null
5481956Scsgr
5491956Scsgrif mkdir -p . 2>/dev/null; then
5501956Scsgr  as_mkdir_p='mkdir -p "$as_dir"'
5511956Scsgrelse
5521956Scsgr  test -d ./-p && rmdir ./-p
5531956Scsgr  as_mkdir_p=false
5541956Scsgrfi
5551956Scsgr
5561956Scsgras_test_x='test -x'
5571956Scsgras_executable_p=as_fn_executable_p
5581956Scsgr
5591956Scsgr# Sed expression to map a string onto a valid CPP name.
5601956Scsgras_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
5611956Scsgr
5621956Scsgr# Sed expression to map a string onto a valid variable name.
5631956Scsgras_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
5642539Spst
56591754Smarkm
5661956Scsgrtest -n "$DJDIR" || exec 7<&0 </dev/null
56751461Smarkmexec 6>&1
56851461Smarkm
56991754Smarkm# Name of the host.
57091754Smarkm# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
57191754Smarkm# so uname gets run too.
57291754Smarkmac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
5731956Scsgr
5741956Scsgr#
5751956Scsgr# Initializations.
5761956Scsgr#
5771956Scsgrac_default_prefix=/usr/local
5781956Scsgrac_clean_files=
57991754Smarkmac_config_libobj_dir=.
58091754SmarkmLIBOBJS=
58191754Smarkmcross_compiling=no
5821956Scsgrsubdirs=
5831956ScsgrMFLAGS=
5841956ScsgrMAKEFLAGS=
58591754Smarkm
58691754Smarkm# Identity of this package.
58791754SmarkmPACKAGE_NAME='OpenJDK'
5881956ScsgrPACKAGE_TARNAME='openjdk'
5891956ScsgrPACKAGE_VERSION='jdk9'
5901956ScsgrPACKAGE_STRING='OpenJDK jdk9'
5911956ScsgrPACKAGE_BUGREPORT='build-dev@openjdk.java.net'
59251461SmarkmPACKAGE_URL='http://openjdk.java.net'
5931956Scsgr
5941956Scsgr# Factoring default headers for most tests.
59551461Smarkmac_includes_default="\
5961956Scsgr#include <stdio.h>
59791754Smarkm#ifdef HAVE_SYS_TYPES_H
5981956Scsgr# include <sys/types.h>
5991956Scsgr#endif
6001956Scsgr#ifdef HAVE_SYS_STAT_H
6011956Scsgr# include <sys/stat.h>
6021956Scsgr#endif
6031956Scsgr#ifdef STDC_HEADERS
6041956Scsgr# include <stdlib.h>
6051956Scsgr# include <stddef.h>
60691754Smarkm#else
60791754Smarkm# ifdef HAVE_STDLIB_H
60891754Smarkm#  include <stdlib.h>
609236304Sbz# endif
6101956Scsgr#endif
6111956Scsgr#ifdef HAVE_STRING_H
61291754Smarkm# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
6131956Scsgr#  include <memory.h>
6141956Scsgr# endif
6151956Scsgr# include <string.h>
6161956Scsgr#endif
6171956Scsgr#ifdef HAVE_STRINGS_H
6181956Scsgr# include <strings.h>
6191956Scsgr#endif
6201956Scsgr#ifdef HAVE_INTTYPES_H
6211956Scsgr# include <inttypes.h>
62291754Smarkm#endif
6231956Scsgr#ifdef HAVE_STDINT_H
6241956Scsgr# include <stdint.h>
62591754Smarkm#endif
6261956Scsgr#ifdef HAVE_UNISTD_H
6271956Scsgr# include <unistd.h>
6281956Scsgr#endif"
6291956Scsgr
6301956Scsgrac_subst_vars='LTLIBOBJS
63191754SmarkmLIBOBJS
6321956ScsgrCFLAGS_CCACHE
6331956ScsgrCCACHE
6341956ScsgrUSE_PRECOMPILED_HEADER
6351956ScsgrBUILD_ICECC
63691754SmarkmICECC
63791754SmarkmICECC_WRAPPER
6381956ScsgrICECC_CREATE_ENV
6391956ScsgrICECC_CMD
64091754SmarkmENABLE_JAVAC_SERVER
6411956ScsgrENABLE_SJAVAC
6421956ScsgrSJAVAC_SERVER_JAVA_FLAGS
6431956ScsgrSJAVAC_SERVER_JAVA
6442900ScsgrJAVA_TOOL_FLAGS_SMALL
6452900ScsgrJAVA_FLAGS_SMALL
6462900ScsgrJAVA_FLAGS_JAVAC
6472900ScsgrBOOTCYCLE_JVM_ARGS_BIG
6482900ScsgrJAVA_FLAGS_BIG
6492900ScsgrJAVA_FLAGS
6502900ScsgrTEST_JOBS
6512900ScsgrJOBS
6522900ScsgrMEMORY_SIZE
65391754SmarkmNUM_CORES
6541956ScsgrENABLE_GENERATE_CLASSLIST
6551956ScsgrBUILD_FAILURE_HANDLER
6561956ScsgrENABLE_INTREE_EC
6571956ScsgrVALID_JVM_FEATURES
6581956ScsgrJVM_FEATURES_custom
6591956ScsgrJVM_FEATURES_zeroshark
6601956ScsgrJVM_FEATURES_zero
6611956ScsgrJVM_FEATURES_minimal
6621956ScsgrJVM_FEATURES_core
6631956ScsgrJVM_FEATURES_client
6641956ScsgrJVM_FEATURES_server
6651956ScsgrINCLUDE_GRAAL
6662900ScsgrELF_LIBS
6672900ScsgrELF_CFLAGS
6682900ScsgrSTLPORT_LIB
6692900ScsgrLIBZIP_CAN_USE_MMAP
6702900ScsgrLIBDL
6712900ScsgrLIBM
6722900ScsgrUSE_EXTERNAL_LCMS
6732900ScsgrLCMS_LIBS
67491754SmarkmLCMS_CFLAGS
6751956ScsgrUSE_EXTERNAL_LIBZ
6761956ScsgrUSE_EXTERNAL_LIBPNG
6771956ScsgrPNG_LIBS
6781956ScsgrPNG_CFLAGS
6791956ScsgrUSE_EXTERNAL_LIBGIF
68091754SmarkmUSE_EXTERNAL_LIBJPEG
6811956ScsgrLLVM_LIBS
6821956ScsgrLLVM_LDFLAGS
6831956ScsgrLLVM_CFLAGS
6841956ScsgrLLVM_CONFIG
6851956ScsgrLIBFFI_LIB_FILE
6861956ScsgrENABLE_LIBFFI_BUNDLING
6871956ScsgrLIBFFI_LIBS
6881956ScsgrLIBFFI_CFLAGS
6891956ScsgrALSA_LIBS
6901956ScsgrALSA_CFLAGS
6911956ScsgrFREETYPE_BUNDLE_LIB_PATH
6921956ScsgrFREETYPE_LIBS
6931956ScsgrFREETYPE_CFLAGS
6941956ScsgrCUPS_CFLAGS
6951956ScsgrX_EXTRA_LIBS
6961956ScsgrX_LIBS
6971956ScsgrX_PRE_LIBS
6981956ScsgrX_CFLAGS
6991956ScsgrXMKMF
7001956ScsgrMSVCP_DLL
7011956ScsgrMSVCR_DLL
7021956ScsgrLIBCXX
7031956ScsgrFIXPATH_DETACH_FLAG
7041956ScsgrFIXPATH
705BUILD_GTEST
706ENABLE_AOT
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
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
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796BUILD_AS
797BUILD_LDCXX
798BUILD_LD
799BUILD_STRIP
800BUILD_OBJCOPY
801BUILD_AR
802BUILD_NM
803BUILD_CXX
804BUILD_CC
805BUILD_SYSROOT_LDFLAGS
806BUILD_SYSROOT_CFLAGS
807ac_ct_OBJDUMP
808OBJDUMP
809ac_ct_OBJCOPY
810OBJCOPY
811ac_ct_NM
812ac_ct_STRIP
813GNM
814NM
815STRIP
816MSBUILD
817DUMPBIN
818RC
819MT
820LIPO
821ac_ct_AR
822AR
823AS
824LDCXX
825LD
826CXXCPP
827CPP
828CXX_VERSION_NUMBER
829CC_VERSION_NUMBER
830ac_ct_CXX
831CXXFLAGS
832CXX
833TOOLCHAIN_PATH_CXX
834POTENTIAL_CXX
835OBJEXT
836EXEEXT
837ac_ct_CC
838CPPFLAGS
839LDFLAGS
840CFLAGS
841CC
842TOOLCHAIN_PATH_CC
843POTENTIAL_CC
844TOOLCHAIN_VERSION
845VS_LIB
846VS_INCLUDE
847VS_PATH
848CYGWIN_LINK
849SYSROOT_LDFLAGS
850SYSROOT_CFLAGS
851EXTRA_LDFLAGS
852EXTRA_CXXFLAGS
853EXTRA_CFLAGS
854EXE_SUFFIX
855OBJ_SUFFIX
856STATIC_LIBRARY
857SHARED_LIBRARY
858STATIC_LIBRARY_SUFFIX
859SHARED_LIBRARY_SUFFIX
860LIBRARY_PREFIX
861TOOLCHAIN_TYPE
862STATIC_BUILD
863IMPORT_MODULES_MAKE
864IMPORT_MODULES_SRC
865IMPORT_MODULES_MAN
866IMPORT_MODULES_LEGAL
867IMPORT_MODULES_CONF
868IMPORT_MODULES_LIBS
869IMPORT_MODULES_CMDS
870IMPORT_MODULES_CLASSES
871BUILD_OUTPUT
872JDK_TOPDIR
873NASHORN_TOPDIR
874HOTSPOT_TOPDIR
875JAXWS_TOPDIR
876JAXP_TOPDIR
877CORBA_TOPDIR
878LANGTOOLS_TOPDIR
879EXTERNAL_BUILDJDK
880BUILD_JDK
881CREATE_BUILDJDK
882JLINK
883JMOD
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_FULL_DOCS
922ENABLE_HEADLESS_ONLY
923DEFAULT_MAKE_TARGET
924OS_VERSION_MICRO
925OS_VERSION_MINOR
926OS_VERSION_MAJOR
927PKG_CONFIG
928BASH_ARGS
929SETFILE
930CODESIGN
931XATTR
932DSYMUTIL
933IS_GNU_TIME
934PATCH
935DTRACE
936FLOCK
937TIME
938STAT
939HG
940DOT
941READELF
942OTOOL
943LDD
944ZIPEXE
945UNZIP
946TAR_SUPPORTS_TRANSFORM
947TAR_INCLUDE_PARAM
948TAR_CREATE_EXTRA_PARAM
949TAR_TYPE
950FIND_DELETE
951OUTPUT_SYNC
952OUTPUT_SYNC_SUPPORTED
953CHECK_TOOLSDIR_MAKE
954CHECK_TOOLSDIR_GMAKE
955CHECK_MAKE
956CHECK_GMAKE
957MAKE
958PKGHANDLER
959CONFIGURESUPPORT_OUTPUTDIR
960OUTPUT_ROOT
961CONF_NAME
962SPEC
963SDKROOT
964XCODEBUILD
965JVM_VARIANT_MAIN
966VALID_JVM_VARIANTS
967JVM_VARIANTS
968DEBUG_LEVEL
969HOTSPOT_DEBUG_LEVEL
970JDK_VARIANT
971USERNAME
972CANONICAL_TOPDIR
973ORIGINAL_TOPDIR
974TOPDIR
975PATH_SEP
976HOTSPOT_BUILD_CPU_DEFINE
977HOTSPOT_BUILD_CPU_ARCH
978HOTSPOT_BUILD_CPU
979HOTSPOT_BUILD_OS_TYPE
980HOTSPOT_BUILD_OS
981OPENJDK_BUILD_BUNDLE_PLATFORM
982OPENJDK_BUILD_OS_EXPORT_DIR
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LEGACY_LIB
986OPENJDK_BUILD_CPU_LEGACY
987HOTSPOT_TARGET_CPU_DEFINE
988HOTSPOT_TARGET_CPU_ARCH
989HOTSPOT_TARGET_CPU
990HOTSPOT_TARGET_OS_TYPE
991HOTSPOT_TARGET_OS
992DEFINE_CROSS_COMPILE_ARCH
993OPENJDK_TARGET_BUNDLE_PLATFORM
994OPENJDK_TARGET_OS_EXPORT_DIR
995OPENJDK_TARGET_CPU_OSARCH
996OPENJDK_TARGET_CPU_ISADIR
997OPENJDK_TARGET_CPU_LEGACY_LIB
998OPENJDK_TARGET_CPU_LEGACY
999OPENJDK_MODULE_TARGET_OS_ARCH
1000OPENJDK_MODULE_TARGET_OS_NAME
1001COMPILE_TYPE
1002OPENJDK_TARGET_CPU_ENDIAN
1003OPENJDK_TARGET_CPU_BITS
1004OPENJDK_TARGET_CPU_ARCH
1005OPENJDK_TARGET_CPU
1006OPENJDK_TARGET_OS_ENV
1007OPENJDK_TARGET_OS_TYPE
1008OPENJDK_TARGET_OS
1009OPENJDK_BUILD_CPU_ENDIAN
1010OPENJDK_BUILD_CPU_BITS
1011OPENJDK_BUILD_CPU_ARCH
1012OPENJDK_BUILD_CPU
1013OPENJDK_BUILD_OS_ENV
1014OPENJDK_BUILD_OS_TYPE
1015OPENJDK_BUILD_OS
1016OPENJDK_BUILD_AUTOCONF_NAME
1017OPENJDK_TARGET_AUTOCONF_NAME
1018target_os
1019target_vendor
1020target_cpu
1021target
1022host_os
1023host_vendor
1024host_cpu
1025host
1026build_os
1027build_vendor
1028build_cpu
1029build
1030PANDOC
1031NICE
1032CPIO
1033DF
1034READLINK
1035CYGPATH
1036SED
1037FGREP
1038EGREP
1039GREP
1040AWK
1041XARGS
1042WHICH
1043WC
1044UNIQ
1045UNAME
1046TR
1047TOUCH
1048TEE
1049TAR
1050TAIL
1051SORT
1052SH
1053RMDIR
1054RM
1055PRINTF
1056NAWK
1057MV
1058MKTEMP
1059MKDIR
1060LS
1061LN
1062GZIP
1063GUNZIP
1064HEAD
1065FIND
1066FILE
1067EXPR
1068ECHO
1069DIRNAME
1070DIFF
1071DATE
1072CUT
1073CP
1074COMM
1075CMP
1076CHMOD
1077CAT
1078BASH
1079BASENAME
1080DATE_WHEN_CONFIGURED
1081ORIGINAL_PATH
1082CONFIGURE_COMMAND_LINE
1083target_alias
1084host_alias
1085build_alias
1086LIBS
1087ECHO_T
1088ECHO_N
1089ECHO_C
1090DEFS
1091mandir
1092localedir
1093libdir
1094psdir
1095pdfdir
1096dvidir
1097htmldir
1098infodir
1099docdir
1100oldincludedir
1101includedir
1102localstatedir
1103sharedstatedir
1104sysconfdir
1105datadir
1106datarootdir
1107libexecdir
1108sbindir
1109bindir
1110program_transform_name
1111prefix
1112exec_prefix
1113PACKAGE_URL
1114PACKAGE_BUGREPORT
1115PACKAGE_STRING
1116PACKAGE_VERSION
1117PACKAGE_TARNAME
1118PACKAGE_NAME
1119PATH_SEPARATOR
1120SHELL'
1121ac_subst_files=''
1122ac_user_opts='
1123enable_option_checking
1124with_target_bits
1125enable_openjdk_only
1126with_custom_make_dir
1127with_jdk_variant
1128enable_debug
1129with_debug_level
1130with_jvm_variants
1131with_cpu_port
1132with_devkit
1133with_sys_root
1134with_sysroot
1135with_tools_dir
1136with_toolchain_path
1137with_extra_path
1138with_sdk_name
1139with_conf_name
1140with_output_sync
1141with_default_make_target
1142enable_headless_only
1143enable_full_docs
1144with_cacerts_file
1145enable_unlimited_crypto
1146with_copyright_year
1147enable_keep_packaged_modules
1148with_milestone
1149with_update_version
1150with_user_release_suffix
1151with_build_number
1152with_version_string
1153with_version_pre
1154with_version_opt
1155with_version_build
1156with_version_major
1157with_version_minor
1158with_version_security
1159with_version_patch
1160with_boot_jdk
1161with_build_jdk
1162with_add_source_root
1163with_override_source_root
1164with_adds_and_overrides
1165with_override_langtools
1166with_override_corba
1167with_override_jaxp
1168with_override_jaxws
1169with_override_hotspot
1170with_override_nashorn
1171with_override_jdk
1172with_import_hotspot
1173with_import_modules
1174enable_static_build
1175with_toolchain_type
1176with_extra_cflags
1177with_extra_cxxflags
1178with_extra_ldflags
1179with_toolchain_version
1180with_build_devkit
1181with_jtreg
1182with_abi_profile
1183enable_warnings_as_errors
1184with_native_debug_symbols
1185enable_debug_symbols
1186enable_zip_debug_info
1187enable_native_coverage
1188enable_dtrace
1189enable_aot
1190enable_hotspot_gtest
1191with_stdc__lib
1192with_msvcr_dll
1193with_msvcp_dll
1194with_x
1195with_cups
1196with_cups_include
1197with_freetype
1198with_freetype_include
1199with_freetype_lib
1200with_freetype_src
1201enable_freetype_bundling
1202with_alsa
1203with_alsa_include
1204with_alsa_lib
1205with_libffi
1206with_libffi_include
1207with_libffi_lib
1208enable_libffi_bundling
1209with_libjpeg
1210with_giflib
1211with_libpng
1212with_zlib
1213with_lcms
1214with_dxsdk
1215with_dxsdk_lib
1216with_dxsdk_include
1217with_libelf
1218with_libelf_include
1219with_libelf_lib
1220with_jvm_features
1221with_jvm_interpreter
1222enable_jtreg_failure_handler
1223enable_generate_classlist
1224with_num_cores
1225with_memory_size
1226with_jobs
1227with_test_jobs
1228with_boot_jdk_jvmargs
1229with_sjavac_server_java
1230enable_sjavac
1231enable_javac_server
1232enable_icecc
1233enable_precompiled_headers
1234enable_ccache
1235with_ccache_dir
1236'
1237      ac_precious_vars='build_alias
1238host_alias
1239target_alias
1240BASENAME
1241BASH
1242CAT
1243CHMOD
1244CMP
1245COMM
1246CP
1247CUT
1248DATE
1249DIFF
1250DIRNAME
1251ECHO
1252EXPR
1253FILE
1254FIND
1255HEAD
1256GUNZIP
1257GZIP
1258LN
1259LS
1260MKDIR
1261MKTEMP
1262MV
1263NAWK
1264PRINTF
1265RM
1266RMDIR
1267SH
1268SORT
1269TAIL
1270TAR
1271TEE
1272TOUCH
1273TR
1274UNAME
1275UNIQ
1276WC
1277WHICH
1278XARGS
1279AWK
1280GREP
1281EGREP
1282FGREP
1283SED
1284CYGPATH
1285READLINK
1286DF
1287CPIO
1288NICE
1289PANDOC
1290MAKE
1291UNZIP
1292ZIPEXE
1293LDD
1294OTOOL
1295READELF
1296DOT
1297HG
1298STAT
1299TIME
1300FLOCK
1301DTRACE
1302PATCH
1303DSYMUTIL
1304XATTR
1305CODESIGN
1306SETFILE
1307PKG_CONFIG
1308JAVA
1309JAVAC
1310JAVAH
1311JAR
1312JARSIGNER
1313CC
1314CFLAGS
1315LDFLAGS
1316LIBS
1317CPPFLAGS
1318CXX
1319CXXFLAGS
1320CCC
1321CPP
1322CXXCPP
1323AS
1324AR
1325LIPO
1326STRIP
1327NM
1328GNM
1329OBJCOPY
1330OBJDUMP
1331BUILD_CC
1332BUILD_CXX
1333BUILD_NM
1334BUILD_AR
1335BUILD_OBJCOPY
1336BUILD_STRIP
1337JTREGEXE
1338XMKMF
1339FREETYPE_CFLAGS
1340FREETYPE_LIBS
1341ALSA_CFLAGS
1342ALSA_LIBS
1343LIBFFI_CFLAGS
1344LIBFFI_LIBS
1345PNG_CFLAGS
1346PNG_LIBS
1347LCMS_CFLAGS
1348LCMS_LIBS
1349ELF_CFLAGS
1350ELF_LIBS
1351ICECC_CMD
1352ICECC_CREATE_ENV
1353ICECC_WRAPPER
1354CCACHE'
1355
1356
1357# Initialize some variables set by options.
1358ac_init_help=
1359ac_init_version=false
1360ac_unrecognized_opts=
1361ac_unrecognized_sep=
1362# The variables have the same names as the options, with
1363# dashes changed to underlines.
1364cache_file=/dev/null
1365exec_prefix=NONE
1366no_create=
1367no_recursion=
1368prefix=NONE
1369program_prefix=NONE
1370program_suffix=NONE
1371program_transform_name=s,x,x,
1372silent=
1373site=
1374srcdir=
1375verbose=
1376x_includes=NONE
1377x_libraries=NONE
1378
1379# Installation directory options.
1380# These are left unexpanded so users can "make install exec_prefix=/foo"
1381# and all the variables that are supposed to be based on exec_prefix
1382# by default will actually change.
1383# Use braces instead of parens because sh, perl, etc. also accept them.
1384# (The list follows the same order as the GNU Coding Standards.)
1385bindir='${exec_prefix}/bin'
1386sbindir='${exec_prefix}/sbin'
1387libexecdir='${exec_prefix}/libexec'
1388datarootdir='${prefix}/share'
1389datadir='${datarootdir}'
1390sysconfdir='${prefix}/etc'
1391sharedstatedir='${prefix}/com'
1392localstatedir='${prefix}/var'
1393includedir='${prefix}/include'
1394oldincludedir='/usr/include'
1395docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1396infodir='${datarootdir}/info'
1397htmldir='${docdir}'
1398dvidir='${docdir}'
1399pdfdir='${docdir}'
1400psdir='${docdir}'
1401libdir='${exec_prefix}/lib'
1402localedir='${datarootdir}/locale'
1403mandir='${datarootdir}/man'
1404
1405ac_prev=
1406ac_dashdash=
1407for ac_option
1408do
1409  # If the previous option needs an argument, assign it.
1410  if test -n "$ac_prev"; then
1411    eval $ac_prev=\$ac_option
1412    ac_prev=
1413    continue
1414  fi
1415
1416  case $ac_option in
1417  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1418  *=)   ac_optarg= ;;
1419  *)    ac_optarg=yes ;;
1420  esac
1421
1422  # Accept the important Cygnus configure options, so we can diagnose typos.
1423
1424  case $ac_dashdash$ac_option in
1425  --)
1426    ac_dashdash=yes ;;
1427
1428  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1429    ac_prev=bindir ;;
1430  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1431    bindir=$ac_optarg ;;
1432
1433  -build | --build | --buil | --bui | --bu)
1434    ac_prev=build_alias ;;
1435  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1436    build_alias=$ac_optarg ;;
1437
1438  -cache-file | --cache-file | --cache-fil | --cache-fi \
1439  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1440    ac_prev=cache_file ;;
1441  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1442  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1443    cache_file=$ac_optarg ;;
1444
1445  --config-cache | -C)
1446    cache_file=config.cache ;;
1447
1448  -datadir | --datadir | --datadi | --datad)
1449    ac_prev=datadir ;;
1450  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1451    datadir=$ac_optarg ;;
1452
1453  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1454  | --dataroo | --dataro | --datar)
1455    ac_prev=datarootdir ;;
1456  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1457  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1458    datarootdir=$ac_optarg ;;
1459
1460  -disable-* | --disable-*)
1461    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1462    # Reject names that are not valid shell variable names.
1463    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464      as_fn_error $? "invalid feature name: $ac_useropt"
1465    ac_useropt_orig=$ac_useropt
1466    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467    case $ac_user_opts in
1468      *"
1469"enable_$ac_useropt"
1470"*) ;;
1471      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1472	 ac_unrecognized_sep=', ';;
1473    esac
1474    eval enable_$ac_useropt=no ;;
1475
1476  -docdir | --docdir | --docdi | --doc | --do)
1477    ac_prev=docdir ;;
1478  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1479    docdir=$ac_optarg ;;
1480
1481  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1482    ac_prev=dvidir ;;
1483  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1484    dvidir=$ac_optarg ;;
1485
1486  -enable-* | --enable-*)
1487    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1488    # Reject names that are not valid shell variable names.
1489    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1490      as_fn_error $? "invalid feature name: $ac_useropt"
1491    ac_useropt_orig=$ac_useropt
1492    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1493    case $ac_user_opts in
1494      *"
1495"enable_$ac_useropt"
1496"*) ;;
1497      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1498	 ac_unrecognized_sep=', ';;
1499    esac
1500    eval enable_$ac_useropt=\$ac_optarg ;;
1501
1502  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1503  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1504  | --exec | --exe | --ex)
1505    ac_prev=exec_prefix ;;
1506  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1507  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1508  | --exec=* | --exe=* | --ex=*)
1509    exec_prefix=$ac_optarg ;;
1510
1511  -gas | --gas | --ga | --g)
1512    # Obsolete; use --with-gas.
1513    with_gas=yes ;;
1514
1515  -help | --help | --hel | --he | -h)
1516    ac_init_help=long ;;
1517  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1518    ac_init_help=recursive ;;
1519  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1520    ac_init_help=short ;;
1521
1522  -host | --host | --hos | --ho)
1523    ac_prev=host_alias ;;
1524  -host=* | --host=* | --hos=* | --ho=*)
1525    host_alias=$ac_optarg ;;
1526
1527  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1528    ac_prev=htmldir ;;
1529  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1530  | --ht=*)
1531    htmldir=$ac_optarg ;;
1532
1533  -includedir | --includedir | --includedi | --included | --include \
1534  | --includ | --inclu | --incl | --inc)
1535    ac_prev=includedir ;;
1536  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1537  | --includ=* | --inclu=* | --incl=* | --inc=*)
1538    includedir=$ac_optarg ;;
1539
1540  -infodir | --infodir | --infodi | --infod | --info | --inf)
1541    ac_prev=infodir ;;
1542  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1543    infodir=$ac_optarg ;;
1544
1545  -libdir | --libdir | --libdi | --libd)
1546    ac_prev=libdir ;;
1547  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1548    libdir=$ac_optarg ;;
1549
1550  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1551  | --libexe | --libex | --libe)
1552    ac_prev=libexecdir ;;
1553  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1554  | --libexe=* | --libex=* | --libe=*)
1555    libexecdir=$ac_optarg ;;
1556
1557  -localedir | --localedir | --localedi | --localed | --locale)
1558    ac_prev=localedir ;;
1559  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1560    localedir=$ac_optarg ;;
1561
1562  -localstatedir | --localstatedir | --localstatedi | --localstated \
1563  | --localstate | --localstat | --localsta | --localst | --locals)
1564    ac_prev=localstatedir ;;
1565  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1566  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1567    localstatedir=$ac_optarg ;;
1568
1569  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1570    ac_prev=mandir ;;
1571  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1572    mandir=$ac_optarg ;;
1573
1574  -nfp | --nfp | --nf)
1575    # Obsolete; use --without-fp.
1576    with_fp=no ;;
1577
1578  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1579  | --no-cr | --no-c | -n)
1580    no_create=yes ;;
1581
1582  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1583  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1584    no_recursion=yes ;;
1585
1586  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1587  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1588  | --oldin | --oldi | --old | --ol | --o)
1589    ac_prev=oldincludedir ;;
1590  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1591  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1592  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1593    oldincludedir=$ac_optarg ;;
1594
1595  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1596    ac_prev=prefix ;;
1597  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1598    prefix=$ac_optarg ;;
1599
1600  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1601  | --program-pre | --program-pr | --program-p)
1602    ac_prev=program_prefix ;;
1603  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1604  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1605    program_prefix=$ac_optarg ;;
1606
1607  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1608  | --program-suf | --program-su | --program-s)
1609    ac_prev=program_suffix ;;
1610  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1611  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1612    program_suffix=$ac_optarg ;;
1613
1614  -program-transform-name | --program-transform-name \
1615  | --program-transform-nam | --program-transform-na \
1616  | --program-transform-n | --program-transform- \
1617  | --program-transform | --program-transfor \
1618  | --program-transfo | --program-transf \
1619  | --program-trans | --program-tran \
1620  | --progr-tra | --program-tr | --program-t)
1621    ac_prev=program_transform_name ;;
1622  -program-transform-name=* | --program-transform-name=* \
1623  | --program-transform-nam=* | --program-transform-na=* \
1624  | --program-transform-n=* | --program-transform-=* \
1625  | --program-transform=* | --program-transfor=* \
1626  | --program-transfo=* | --program-transf=* \
1627  | --program-trans=* | --program-tran=* \
1628  | --progr-tra=* | --program-tr=* | --program-t=*)
1629    program_transform_name=$ac_optarg ;;
1630
1631  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1632    ac_prev=pdfdir ;;
1633  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1634    pdfdir=$ac_optarg ;;
1635
1636  -psdir | --psdir | --psdi | --psd | --ps)
1637    ac_prev=psdir ;;
1638  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1639    psdir=$ac_optarg ;;
1640
1641  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1642  | -silent | --silent | --silen | --sile | --sil)
1643    silent=yes ;;
1644
1645  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1646    ac_prev=sbindir ;;
1647  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1648  | --sbi=* | --sb=*)
1649    sbindir=$ac_optarg ;;
1650
1651  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1652  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1653  | --sharedst | --shareds | --shared | --share | --shar \
1654  | --sha | --sh)
1655    ac_prev=sharedstatedir ;;
1656  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1657  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1658  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1659  | --sha=* | --sh=*)
1660    sharedstatedir=$ac_optarg ;;
1661
1662  -site | --site | --sit)
1663    ac_prev=site ;;
1664  -site=* | --site=* | --sit=*)
1665    site=$ac_optarg ;;
1666
1667  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1668    ac_prev=srcdir ;;
1669  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1670    srcdir=$ac_optarg ;;
1671
1672  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1673  | --syscon | --sysco | --sysc | --sys | --sy)
1674    ac_prev=sysconfdir ;;
1675  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1676  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1677    sysconfdir=$ac_optarg ;;
1678
1679  -target | --target | --targe | --targ | --tar | --ta | --t)
1680    ac_prev=target_alias ;;
1681  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1682    target_alias=$ac_optarg ;;
1683
1684  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1685    verbose=yes ;;
1686
1687  -version | --version | --versio | --versi | --vers | -V)
1688    ac_init_version=: ;;
1689
1690  -with-* | --with-*)
1691    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1692    # Reject names that are not valid shell variable names.
1693    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694      as_fn_error $? "invalid package name: $ac_useropt"
1695    ac_useropt_orig=$ac_useropt
1696    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697    case $ac_user_opts in
1698      *"
1699"with_$ac_useropt"
1700"*) ;;
1701      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1702	 ac_unrecognized_sep=', ';;
1703    esac
1704    eval with_$ac_useropt=\$ac_optarg ;;
1705
1706  -without-* | --without-*)
1707    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1708    # Reject names that are not valid shell variable names.
1709    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1710      as_fn_error $? "invalid package name: $ac_useropt"
1711    ac_useropt_orig=$ac_useropt
1712    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1713    case $ac_user_opts in
1714      *"
1715"with_$ac_useropt"
1716"*) ;;
1717      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1718	 ac_unrecognized_sep=', ';;
1719    esac
1720    eval with_$ac_useropt=no ;;
1721
1722  --x)
1723    # Obsolete; use --with-x.
1724    with_x=yes ;;
1725
1726  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1727  | --x-incl | --x-inc | --x-in | --x-i)
1728    ac_prev=x_includes ;;
1729  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1730  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1731    x_includes=$ac_optarg ;;
1732
1733  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1734  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1735    ac_prev=x_libraries ;;
1736  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1737  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1738    x_libraries=$ac_optarg ;;
1739
1740  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1741Try \`$0 --help' for more information"
1742    ;;
1743
1744  *=*)
1745    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1746    # Reject names that are not valid shell variable names.
1747    case $ac_envvar in #(
1748      '' | [0-9]* | *[!_$as_cr_alnum]* )
1749      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1750    esac
1751    eval $ac_envvar=\$ac_optarg
1752    export $ac_envvar ;;
1753
1754  *)
1755    # FIXME: should be removed in autoconf 3.0.
1756    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1757    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1758      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1759    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1760    ;;
1761
1762  esac
1763done
1764
1765if test -n "$ac_prev"; then
1766  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1767  as_fn_error $? "missing argument to $ac_option"
1768fi
1769
1770if test -n "$ac_unrecognized_opts"; then
1771  case $enable_option_checking in
1772    no) ;;
1773    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1774    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1775  esac
1776fi
1777
1778# Check all directory arguments for consistency.
1779for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1780		datadir sysconfdir sharedstatedir localstatedir includedir \
1781		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1782		libdir localedir mandir
1783do
1784  eval ac_val=\$$ac_var
1785  # Remove trailing slashes.
1786  case $ac_val in
1787    */ )
1788      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1789      eval $ac_var=\$ac_val;;
1790  esac
1791  # Be sure to have absolute directory names.
1792  case $ac_val in
1793    [\\/$]* | ?:[\\/]* )  continue;;
1794    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1795  esac
1796  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1797done
1798
1799# There might be people who depend on the old broken behavior: `$host'
1800# used to hold the argument of --host etc.
1801# FIXME: To remove some day.
1802build=$build_alias
1803host=$host_alias
1804target=$target_alias
1805
1806# FIXME: To remove some day.
1807if test "x$host_alias" != x; then
1808  if test "x$build_alias" = x; then
1809    cross_compiling=maybe
1810  elif test "x$build_alias" != "x$host_alias"; then
1811    cross_compiling=yes
1812  fi
1813fi
1814
1815ac_tool_prefix=
1816test -n "$host_alias" && ac_tool_prefix=$host_alias-
1817
1818test "$silent" = yes && exec 6>/dev/null
1819
1820
1821ac_pwd=`pwd` && test -n "$ac_pwd" &&
1822ac_ls_di=`ls -di .` &&
1823ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1824  as_fn_error $? "working directory cannot be determined"
1825test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1826  as_fn_error $? "pwd does not report name of working directory"
1827
1828
1829# Find the source files, if location was not specified.
1830if test -z "$srcdir"; then
1831  ac_srcdir_defaulted=yes
1832  # Try the directory containing this script, then the parent directory.
1833  ac_confdir=`$as_dirname -- "$as_myself" ||
1834$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1835	 X"$as_myself" : 'X\(//\)[^/]' \| \
1836	 X"$as_myself" : 'X\(//\)$' \| \
1837	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1838$as_echo X"$as_myself" |
1839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)[^/].*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)$/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\).*/{
1852	    s//\1/
1853	    q
1854	  }
1855	  s/.*/./; q'`
1856  srcdir=$ac_confdir
1857  if test ! -r "$srcdir/$ac_unique_file"; then
1858    srcdir=..
1859  fi
1860else
1861  ac_srcdir_defaulted=no
1862fi
1863if test ! -r "$srcdir/$ac_unique_file"; then
1864  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1865  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1866fi
1867ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1868ac_abs_confdir=`(
1869	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1870	pwd)`
1871# When building in place, set srcdir=.
1872if test "$ac_abs_confdir" = "$ac_pwd"; then
1873  srcdir=.
1874fi
1875# Remove unnecessary trailing slashes from srcdir.
1876# Double slashes in file names in object file debugging info
1877# mess up M-x gdb in Emacs.
1878case $srcdir in
1879*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1880esac
1881for ac_var in $ac_precious_vars; do
1882  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_env_${ac_var}_value=\$${ac_var}
1884  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1886done
1887
1888#
1889# Report the --help message.
1890#
1891if test "$ac_init_help" = "long"; then
1892  # Omit some internal or obsolete options to make the list less imposing.
1893  # This message is too long to be a string in the A/UX 3.1 sh.
1894  cat <<_ACEOF
1895\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1896
1897Usage: $0 [OPTION]... [VAR=VALUE]...
1898
1899To assign environment variables (e.g., CC, CFLAGS...), specify them as
1900VAR=VALUE.  See below for descriptions of some of the useful variables.
1901
1902Defaults for the options are specified in brackets.
1903
1904Configuration:
1905  -h, --help              display this help and exit
1906      --help=short        display options specific to this package
1907      --help=recursive    display the short help of all the included packages
1908  -V, --version           display version information and exit
1909  -q, --quiet, --silent   do not print \`checking ...' messages
1910      --cache-file=FILE   cache test results in FILE [disabled]
1911  -C, --config-cache      alias for \`--cache-file=config.cache'
1912  -n, --no-create         do not create output files
1913      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1914
1915Installation directories:
1916  --prefix=PREFIX         install architecture-independent files in PREFIX
1917                          [$ac_default_prefix]
1918  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1919                          [PREFIX]
1920
1921By default, \`make install' will install all the files in
1922\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1923an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1924for instance \`--prefix=\$HOME'.
1925
1926For better control, use the options below.
1927
1928Fine tuning of the installation directories:
1929  --bindir=DIR            user executables [EPREFIX/bin]
1930  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1931  --libexecdir=DIR        program executables [EPREFIX/libexec]
1932  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1933  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1934  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1935  --libdir=DIR            object code libraries [EPREFIX/lib]
1936  --includedir=DIR        C header files [PREFIX/include]
1937  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1938  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1939  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1940  --infodir=DIR           info documentation [DATAROOTDIR/info]
1941  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1942  --mandir=DIR            man documentation [DATAROOTDIR/man]
1943  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1944  --htmldir=DIR           html documentation [DOCDIR]
1945  --dvidir=DIR            dvi documentation [DOCDIR]
1946  --pdfdir=DIR            pdf documentation [DOCDIR]
1947  --psdir=DIR             ps documentation [DOCDIR]
1948_ACEOF
1949
1950  cat <<\_ACEOF
1951
1952X features:
1953  --x-includes=DIR    X include files are in DIR
1954  --x-libraries=DIR   X library files are in DIR
1955
1956System types:
1957  --build=BUILD     configure for building on BUILD [guessed]
1958  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1959  --target=TARGET   configure for building compilers for TARGET [HOST]
1960_ACEOF
1961fi
1962
1963if test -n "$ac_init_help"; then
1964  case $ac_init_help in
1965     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1966   esac
1967  cat <<\_ACEOF
1968
1969Optional Features:
1970  --disable-option-checking  ignore unrecognized --enable/--with options
1971  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1972  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1973  --enable-openjdk-only   suppress building custom source even if present
1974                          [disabled]
1975  --enable-debug          set the debug level to fastdebug (shorthand for
1976                          --with-debug-level=fastdebug) [disabled]
1977  --enable-headless-only  only build headless (no GUI) support [disabled]
1978  --enable-full-docs      build complete documentation [enabled if all tools
1979                          found]
1980  --disable-unlimited-crypto
1981                          Disable unlimited crypto policy [enabled]
1982  --disable-keep-packaged-modules
1983                          Do not keep packaged modules in jdk image [enable]
1984  --enable-static-build   enable static library build [disabled]
1985  --disable-warnings-as-errors
1986                          do not consider native warnings to be an error
1987                          [enabled]
1988  --enable-debug-symbols  Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-zip-debug-info Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-native-coverage
1993                          enable native compilation with code coverage
1994                          data[disabled]
1995  --enable-dtrace[=yes/no/auto]
1996                          enable dtrace. Default is auto, where dtrace is
1997                          enabled if all dependencies are present.
1998  --enable-aot[=yes/no/auto]
1999                          enable ahead of time compilation feature. Default is
2000                          auto, where aot is enabled if all dependencies are
2001                          present.
2002  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2003  --disable-freetype-bundling
2004                          disable bundling of the freetype library with the
2005                          build result [enabled on Windows or when using
2006                          --with-freetype, disabled otherwise]
2007  --enable-libffi-bundling
2008                          enable bundling of libffi.so to make the built JDK
2009                          runnable on more systems
2010  --enable-jtreg-failure-handler
2011                          forces build of the jtreg failure handler to be
2012                          enabled, missing dependencies become fatal errors.
2013                          Default is auto, where the failure handler is built
2014                          if all dependencies are present and otherwise just
2015                          disabled.
2016  --disable-generate-classlist
2017                          forces enabling or disabling of the generation of a
2018                          CDS classlist at build time. Default is to generate
2019                          it when either the server or client JVMs are built.
2020  --enable-sjavac         use sjavac to do fast incremental compiles
2021                          [disabled]
2022  --disable-javac-server  disable javac server [enabled]
2023  --enable-icecc          enable distribted compilation of native code using
2024                          icecc/icecream [disabled]
2025  --disable-precompiled-headers
2026                          disable using precompiled headers when compiling C++
2027                          [enabled]
2028  --enable-ccache         enable using ccache to speed up recompilations
2029                          [disabled]
2030
2031Optional Packages:
2032  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                          support it), e.g. --with-target-bits=32 [guessed]
2036  --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-jdk-variant      JDK variant to build (normal) [normal]
2039  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                          optimized) [release]
2041  --with-jvm-variants     JVM variants (separated by commas) to build
2042                          (server,client,minimal,core,zero,zeroshark,custom)
2043                          [server]
2044  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2045                          (arm64,aarch64) [aarch64]
2046  --with-devkit           use this devkit for compilers, tools and resources
2047  --with-sys-root         alias for --with-sysroot for backwards compatability
2048  --with-sysroot          use this directory as sysroot
2049  --with-tools-dir        alias for --with-toolchain-path for backwards
2050                          compatibility
2051  --with-toolchain-path   prepend these directories when searching for
2052                          toolchain binaries (compilers etc)
2053  --with-extra-path       prepend these directories to the default path
2054  --with-sdk-name         use the platform SDK of the given name. [macosx]
2055  --with-conf-name        use this as the name of the configuration [generated
2056                          from important configuration options]
2057  --with-output-sync      set make output sync type if supported by make.
2058                          [recurse]
2059  --with-default-make-target
2060                          set the default make target [exploded-image]
2061  --with-cacerts-file     specify alternative cacerts file
2062  --with-copyright-year   Set copyright year value for build [current year]
2063  --with-milestone        Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-update-version   Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-user-release-suffix
2068                          Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-build-number     Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-version-string   Set version string [calculated]
2073  --with-version-pre      Set the base part of the version 'PRE' field
2074                          (pre-release identifier) ['internal']
2075  --with-version-opt      Set version 'OPT' field (build metadata)
2076                          [<timestamp>.<user>.<dirname>]
2077  --with-version-build    Set version 'BUILD' field (build number) [not
2078                          specified]
2079  --with-version-major    Set version 'MAJOR' field (first number) [current
2080                          source value]
2081  --with-version-minor    Set version 'MINOR' field (second number) [current
2082                          source value]
2083  --with-version-security Set version 'SECURITY' field (third number) [current
2084                          source value]
2085  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                          specified]
2087  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088  --with-build-jdk        path to JDK of same version as is being built[the
2089                          newly built JDK]
2090  --with-add-source-root  Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-source-root
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-adds-and-overrides
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-langtools
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-corba   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxp    Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jaxws   Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-hotspot Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-nashorn Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-override-jdk     Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import_hotspot   Deprecated. Option is kept for backwards
2114                          compatibility and is ignored
2115  --with-import-modules   import a set of prebuilt modules either as a zip
2116                          file or an exploded directory
2117  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2118                          to show possible values [platform dependent]
2119  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2120  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2121  --with-extra-ldflags    extra flags to be used when linking jdk
2122  --with-toolchain-version
2123                          the version of the toolchain to look for, use
2124                          '--help' to show possible values [platform
2125                          dependent]
2126  --with-build-devkit     Devkit to use for the build platform toolchain
2127  --with-jtreg            Regression Test Harness [probed]
2128  --with-abi-profile      specify ABI profile for ARM builds
2129                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2130                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2131                          [toolchain dependent]
2132  --with-native-debug-symbols
2133                          set the native debug symbol configuration (none,
2134                          internal, external, zipped) [varying]
2135  --with-stdc++lib=<static>,<dynamic>,<default>
2136                          force linking of the C++ runtime on Linux to either
2137                          static or dynamic, default is static with dynamic as
2138                          fallback
2139  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2140                          (Windows only) [probed]
2141  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2142                          (Windows only) [probed]
2143  --with-x                use the X Window System
2144  --with-cups             specify prefix directory for the cups package
2145                          (expecting the headers under PATH/include)
2146  --with-cups-include     specify directory for the cups include files
2147  --with-freetype         specify prefix directory for the freetype package
2148                          (expecting the libraries under PATH/lib and the
2149                          headers under PATH/include)
2150  --with-freetype-include specify directory for the freetype include files
2151  --with-freetype-lib     specify directory for the freetype library
2152  --with-freetype-src     specify directory with freetype sources to
2153                          automatically build the library (experimental,
2154                          Windows-only)
2155  --with-alsa             specify prefix directory for the alsa package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-alsa-include     specify directory for the alsa include files
2159  --with-alsa-lib         specify directory for the alsa library
2160  --with-libffi           specify prefix directory for the libffi package
2161                          (expecting the libraries under PATH/lib and the
2162                          headers under PATH/include)
2163  --with-libffi-include   specify directory for the libffi include files
2164  --with-libffi-lib       specify directory for the libffi library
2165  --with-libjpeg          use libjpeg from build system or OpenJDK source
2166                          (system, bundled) [bundled]
2167  --with-giflib           use giflib from build system or OpenJDK source
2168                          (system, bundled) [bundled]
2169  --with-libpng           use libpng from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-zlib             use zlib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-lcms             use lcms2 from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-dxsdk            Deprecated. Option is kept for backwards
2176                          compatibility and is ignored
2177  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2178                          compatibility and is ignored
2179  --with-dxsdk-include    Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-libelf           specify prefix directory for the libelf package
2182                          (expecting the libraries under PATH/lib and the
2183                          headers under PATH/include)
2184  --with-libelf-include   specify directory for the libelf include files
2185  --with-libelf-lib       specify directory for the libelf library
2186  --with-jvm-features     additional JVM features to enable (separated by
2187                          comma), use '--help' to show possible values [none]
2188  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2189                          compatibility and is ignored
2190  --with-num-cores        number of cores in the build system, e.g.
2191                          --with-num-cores=8 [probed]
2192  --with-memory-size      memory (in MB) available in the build system, e.g.
2193                          --with-memory-size=1024 [probed]
2194  --with-jobs             number of parallel jobs to let make run [calculated
2195                          based on cores and memory]
2196  --with-test-jobs        number of parallel tests jobs to run [based on build
2197                          jobs]
2198  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2199                          invocations of boot JDK, overriding the default
2200                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2201                          -enableassertions"
2202  --with-sjavac-server-java
2203                          use this java binary for running the sjavac
2204                          background server [Boot JDK java]
2205  --with-ccache-dir       where to store ccache files [~/.ccache]
2206
2207Some influential environment variables:
2208  BASENAME    Override default value for BASENAME
2209  BASH        Override default value for BASH
2210  CAT         Override default value for CAT
2211  CHMOD       Override default value for CHMOD
2212  CMP         Override default value for CMP
2213  COMM        Override default value for COMM
2214  CP          Override default value for CP
2215  CUT         Override default value for CUT
2216  DATE        Override default value for DATE
2217  DIFF        Override default value for DIFF
2218  DIRNAME     Override default value for DIRNAME
2219  ECHO        Override default value for ECHO
2220  EXPR        Override default value for EXPR
2221  FILE        Override default value for FILE
2222  FIND        Override default value for FIND
2223  HEAD        Override default value for HEAD
2224  GUNZIP      Override default value for GUNZIP
2225  GZIP        Override default value for GZIP
2226  LN          Override default value for LN
2227  LS          Override default value for LS
2228  MKDIR       Override default value for MKDIR
2229  MKTEMP      Override default value for MKTEMP
2230  MV          Override default value for MV
2231  NAWK        Override default value for NAWK
2232  PRINTF      Override default value for PRINTF
2233  RM          Override default value for RM
2234  RMDIR       Override default value for RMDIR
2235  SH          Override default value for SH
2236  SORT        Override default value for SORT
2237  TAIL        Override default value for TAIL
2238  TAR         Override default value for TAR
2239  TEE         Override default value for TEE
2240  TOUCH       Override default value for TOUCH
2241  TR          Override default value for TR
2242  UNAME       Override default value for UNAME
2243  UNIQ        Override default value for UNIQ
2244  WC          Override default value for WC
2245  WHICH       Override default value for WHICH
2246  XARGS       Override default value for XARGS
2247  AWK         Override default value for AWK
2248  GREP        Override default value for GREP
2249  EGREP       Override default value for EGREP
2250  FGREP       Override default value for FGREP
2251  SED         Override default value for SED
2252  CYGPATH     Override default value for CYGPATH
2253  READLINK    Override default value for READLINK
2254  DF          Override default value for DF
2255  CPIO        Override default value for CPIO
2256  NICE        Override default value for NICE
2257  PANDOC      Override default value for PANDOC
2258  MAKE        Override default value for MAKE
2259  UNZIP       Override default value for UNZIP
2260  ZIPEXE      Override default value for ZIPEXE
2261  LDD         Override default value for LDD
2262  OTOOL       Override default value for OTOOL
2263  READELF     Override default value for READELF
2264  DOT         Override default value for DOT
2265  HG          Override default value for HG
2266  STAT        Override default value for STAT
2267  TIME        Override default value for TIME
2268  FLOCK       Override default value for FLOCK
2269  DTRACE      Override default value for DTRACE
2270  PATCH       Override default value for PATCH
2271  DSYMUTIL    Override default value for DSYMUTIL
2272  XATTR       Override default value for XATTR
2273  CODESIGN    Override default value for CODESIGN
2274  SETFILE     Override default value for SETFILE
2275  PKG_CONFIG  path to pkg-config utility
2276  JAVA        Override default value for JAVA
2277  JAVAC       Override default value for JAVAC
2278  JAVAH       Override default value for JAVAH
2279  JAR         Override default value for JAR
2280  JARSIGNER   Override default value for JARSIGNER
2281  CC          C compiler command
2282  CFLAGS      C compiler flags
2283  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2284              nonstandard directory <lib dir>
2285  LIBS        libraries to pass to the linker, e.g. -l<library>
2286  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2287              you have headers in a nonstandard directory <include dir>
2288  CXX         C++ compiler command
2289  CXXFLAGS    C++ compiler flags
2290  CPP         C preprocessor
2291  CXXCPP      C++ preprocessor
2292  AS          Override default value for AS
2293  AR          Override default value for AR
2294  LIPO        Override default value for LIPO
2295  STRIP       Override default value for STRIP
2296  NM          Override default value for NM
2297  GNM         Override default value for GNM
2298  OBJCOPY     Override default value for OBJCOPY
2299  OBJDUMP     Override default value for OBJDUMP
2300  BUILD_CC    Override default value for BUILD_CC
2301  BUILD_CXX   Override default value for BUILD_CXX
2302  BUILD_NM    Override default value for BUILD_NM
2303  BUILD_AR    Override default value for BUILD_AR
2304  BUILD_OBJCOPY
2305              Override default value for BUILD_OBJCOPY
2306  BUILD_STRIP Override default value for BUILD_STRIP
2307  JTREGEXE    Override default value for JTREGEXE
2308  XMKMF       Path to xmkmf, Makefile generator for X Window System
2309  FREETYPE_CFLAGS
2310              C compiler flags for FREETYPE, overriding pkg-config
2311  FREETYPE_LIBS
2312              linker flags for FREETYPE, overriding pkg-config
2313  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2314  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2315  LIBFFI_CFLAGS
2316              C compiler flags for LIBFFI, overriding pkg-config
2317  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2318  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2319  PNG_LIBS    linker flags for PNG, overriding pkg-config
2320  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2321  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2322  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2323  ELF_LIBS    linker flags for ELF, overriding pkg-config
2324  ICECC_CMD   Override default value for ICECC_CMD
2325  ICECC_CREATE_ENV
2326              Override default value for ICECC_CREATE_ENV
2327  ICECC_WRAPPER
2328              Override default value for ICECC_WRAPPER
2329  CCACHE      Override default value for CCACHE
2330
2331Use these variables to override the choices made by `configure' or to help
2332it to find libraries and programs with nonstandard names/locations.
2333
2334Report bugs to <build-dev@openjdk.java.net>.
2335OpenJDK home page: <http://openjdk.java.net>.
2336_ACEOF
2337ac_status=$?
2338fi
2339
2340if test "$ac_init_help" = "recursive"; then
2341  # If there are subdirs, report their specific --help.
2342  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2343    test -d "$ac_dir" ||
2344      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2345      continue
2346    ac_builddir=.
2347
2348case "$ac_dir" in
2349.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2350*)
2351  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2352  # A ".." for each directory in $ac_dir_suffix.
2353  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2354  case $ac_top_builddir_sub in
2355  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2356  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2357  esac ;;
2358esac
2359ac_abs_top_builddir=$ac_pwd
2360ac_abs_builddir=$ac_pwd$ac_dir_suffix
2361# for backward compatibility:
2362ac_top_builddir=$ac_top_build_prefix
2363
2364case $srcdir in
2365  .)  # We are building in place.
2366    ac_srcdir=.
2367    ac_top_srcdir=$ac_top_builddir_sub
2368    ac_abs_top_srcdir=$ac_pwd ;;
2369  [\\/]* | ?:[\\/]* )  # Absolute name.
2370    ac_srcdir=$srcdir$ac_dir_suffix;
2371    ac_top_srcdir=$srcdir
2372    ac_abs_top_srcdir=$srcdir ;;
2373  *) # Relative name.
2374    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2375    ac_top_srcdir=$ac_top_build_prefix$srcdir
2376    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2377esac
2378ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2379
2380    cd "$ac_dir" || { ac_status=$?; continue; }
2381    # Check for guested configure.
2382    if test -f "$ac_srcdir/configure.gnu"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2385    elif test -f "$ac_srcdir/configure"; then
2386      echo &&
2387      $SHELL "$ac_srcdir/configure" --help=recursive
2388    else
2389      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2390    fi || ac_status=$?
2391    cd "$ac_pwd" || { ac_status=$?; break; }
2392  done
2393fi
2394
2395test -n "$ac_init_help" && exit $ac_status
2396if $ac_init_version; then
2397  cat <<\_ACEOF
2398OpenJDK configure jdk9
2399generated by GNU Autoconf 2.69
2400
2401Copyright (C) 2012 Free Software Foundation, Inc.
2402This configure script is free software; the Free Software Foundation
2403gives unlimited permission to copy, distribute and modify it.
2404_ACEOF
2405  exit
2406fi
2407
2408## ------------------------ ##
2409## Autoconf initialization. ##
2410## ------------------------ ##
2411
2412# ac_fn_c_try_compile LINENO
2413# --------------------------
2414# Try to compile conftest.$ac_ext, and return whether this succeeded.
2415ac_fn_c_try_compile ()
2416{
2417  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2418  rm -f conftest.$ac_objext
2419  if { { ac_try="$ac_compile"
2420case "(($ac_try" in
2421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422  *) ac_try_echo=$ac_try;;
2423esac
2424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425$as_echo "$ac_try_echo"; } >&5
2426  (eval "$ac_compile") 2>conftest.err
2427  ac_status=$?
2428  if test -s conftest.err; then
2429    grep -v '^ *+' conftest.err >conftest.er1
2430    cat conftest.er1 >&5
2431    mv -f conftest.er1 conftest.err
2432  fi
2433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2434  test $ac_status = 0; } && {
2435	 test -z "$ac_c_werror_flag" ||
2436	 test ! -s conftest.err
2437       } && test -s conftest.$ac_objext; then :
2438  ac_retval=0
2439else
2440  $as_echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
2443	ac_retval=1
2444fi
2445  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446  as_fn_set_status $ac_retval
2447
2448} # ac_fn_c_try_compile
2449
2450# ac_fn_cxx_try_compile LINENO
2451# ----------------------------
2452# Try to compile conftest.$ac_ext, and return whether this succeeded.
2453ac_fn_cxx_try_compile ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  rm -f conftest.$ac_objext
2457  if { { ac_try="$ac_compile"
2458case "(($ac_try" in
2459  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2460  *) ac_try_echo=$ac_try;;
2461esac
2462eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2463$as_echo "$ac_try_echo"; } >&5
2464  (eval "$ac_compile") 2>conftest.err
2465  ac_status=$?
2466  if test -s conftest.err; then
2467    grep -v '^ *+' conftest.err >conftest.er1
2468    cat conftest.er1 >&5
2469    mv -f conftest.er1 conftest.err
2470  fi
2471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2472  test $ac_status = 0; } && {
2473	 test -z "$ac_cxx_werror_flag" ||
2474	 test ! -s conftest.err
2475       } && test -s conftest.$ac_objext; then :
2476  ac_retval=0
2477else
2478  $as_echo "$as_me: failed program was:" >&5
2479sed 's/^/| /' conftest.$ac_ext >&5
2480
2481	ac_retval=1
2482fi
2483  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2484  as_fn_set_status $ac_retval
2485
2486} # ac_fn_cxx_try_compile
2487
2488# ac_fn_c_try_cpp LINENO
2489# ----------------------
2490# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2491ac_fn_c_try_cpp ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  if { { ac_try="$ac_cpp conftest.$ac_ext"
2495case "(($ac_try" in
2496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2497  *) ac_try_echo=$ac_try;;
2498esac
2499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2500$as_echo "$ac_try_echo"; } >&5
2501  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2502  ac_status=$?
2503  if test -s conftest.err; then
2504    grep -v '^ *+' conftest.err >conftest.er1
2505    cat conftest.er1 >&5
2506    mv -f conftest.er1 conftest.err
2507  fi
2508  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2509  test $ac_status = 0; } > conftest.i && {
2510	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2511	 test ! -s conftest.err
2512       }; then :
2513  ac_retval=0
2514else
2515  $as_echo "$as_me: failed program was:" >&5
2516sed 's/^/| /' conftest.$ac_ext >&5
2517
2518    ac_retval=1
2519fi
2520  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2521  as_fn_set_status $ac_retval
2522
2523} # ac_fn_c_try_cpp
2524
2525# ac_fn_cxx_try_cpp LINENO
2526# ------------------------
2527# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2528ac_fn_cxx_try_cpp ()
2529{
2530  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2531  if { { ac_try="$ac_cpp conftest.$ac_ext"
2532case "(($ac_try" in
2533  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2534  *) ac_try_echo=$ac_try;;
2535esac
2536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2537$as_echo "$ac_try_echo"; } >&5
2538  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2539  ac_status=$?
2540  if test -s conftest.err; then
2541    grep -v '^ *+' conftest.err >conftest.er1
2542    cat conftest.er1 >&5
2543    mv -f conftest.er1 conftest.err
2544  fi
2545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2546  test $ac_status = 0; } > conftest.i && {
2547	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2548	 test ! -s conftest.err
2549       }; then :
2550  ac_retval=0
2551else
2552  $as_echo "$as_me: failed program was:" >&5
2553sed 's/^/| /' conftest.$ac_ext >&5
2554
2555    ac_retval=1
2556fi
2557  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2558  as_fn_set_status $ac_retval
2559
2560} # ac_fn_cxx_try_cpp
2561
2562# ac_fn_c_try_link LINENO
2563# -----------------------
2564# Try to link conftest.$ac_ext, and return whether this succeeded.
2565ac_fn_c_try_link ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  rm -f conftest.$ac_objext conftest$ac_exeext
2569  if { { ac_try="$ac_link"
2570case "(($ac_try" in
2571  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2572  *) ac_try_echo=$ac_try;;
2573esac
2574eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2575$as_echo "$ac_try_echo"; } >&5
2576  (eval "$ac_link") 2>conftest.err
2577  ac_status=$?
2578  if test -s conftest.err; then
2579    grep -v '^ *+' conftest.err >conftest.er1
2580    cat conftest.er1 >&5
2581    mv -f conftest.er1 conftest.err
2582  fi
2583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2584  test $ac_status = 0; } && {
2585	 test -z "$ac_c_werror_flag" ||
2586	 test ! -s conftest.err
2587       } && test -s conftest$ac_exeext && {
2588	 test "$cross_compiling" = yes ||
2589	 test -x conftest$ac_exeext
2590       }; then :
2591  ac_retval=0
2592else
2593  $as_echo "$as_me: failed program was:" >&5
2594sed 's/^/| /' conftest.$ac_ext >&5
2595
2596	ac_retval=1
2597fi
2598  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2599  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2600  # interfere with the next link command; also delete a directory that is
2601  # left behind by Apple's compiler.  We do this before executing the actions.
2602  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2603  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2604  as_fn_set_status $ac_retval
2605
2606} # ac_fn_c_try_link
2607
2608# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2609# ---------------------------------------------------------
2610# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2611# the include files in INCLUDES and setting the cache variable VAR
2612# accordingly.
2613ac_fn_cxx_check_header_mongrel ()
2614{
2615  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2616  if eval \${$3+:} false; then :
2617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2618$as_echo_n "checking for $2... " >&6; }
2619if eval \${$3+:} false; then :
2620  $as_echo_n "(cached) " >&6
2621fi
2622eval ac_res=\$$3
2623	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2624$as_echo "$ac_res" >&6; }
2625else
2626  # Is the header compilable?
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2628$as_echo_n "checking $2 usability... " >&6; }
2629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630/* end confdefs.h.  */
2631$4
2632#include <$2>
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_header_compiler=yes
2636else
2637  ac_header_compiler=no
2638fi
2639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2641$as_echo "$ac_header_compiler" >&6; }
2642
2643# Is the header present?
2644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2645$as_echo_n "checking $2 presence... " >&6; }
2646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2647/* end confdefs.h.  */
2648#include <$2>
2649_ACEOF
2650if ac_fn_cxx_try_cpp "$LINENO"; then :
2651  ac_header_preproc=yes
2652else
2653  ac_header_preproc=no
2654fi
2655rm -f conftest.err conftest.i conftest.$ac_ext
2656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2657$as_echo "$ac_header_preproc" >&6; }
2658
2659# So?  What about this header?
2660case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2661  yes:no: )
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2663$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2666    ;;
2667  no:yes:* )
2668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2669$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2671$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2673$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2675$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2676    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2677$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2678( $as_echo "## ----------------------------------------- ##
2679## Report this to build-dev@openjdk.java.net ##
2680## ----------------------------------------- ##"
2681     ) | sed "s/^/$as_me: WARNING:     /" >&2
2682    ;;
2683esac
2684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2685$as_echo_n "checking for $2... " >&6; }
2686if eval \${$3+:} false; then :
2687  $as_echo_n "(cached) " >&6
2688else
2689  eval "$3=\$ac_header_compiler"
2690fi
2691eval ac_res=\$$3
2692	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2693$as_echo "$ac_res" >&6; }
2694fi
2695  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2696
2697} # ac_fn_cxx_check_header_mongrel
2698
2699# ac_fn_cxx_try_run LINENO
2700# ------------------------
2701# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2702# that executables *can* be run.
2703ac_fn_cxx_try_run ()
2704{
2705  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2706  if { { ac_try="$ac_link"
2707case "(($ac_try" in
2708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709  *) ac_try_echo=$ac_try;;
2710esac
2711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2712$as_echo "$ac_try_echo"; } >&5
2713  (eval "$ac_link") 2>&5
2714  ac_status=$?
2715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2716  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2717  { { case "(($ac_try" in
2718  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2719  *) ac_try_echo=$ac_try;;
2720esac
2721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2722$as_echo "$ac_try_echo"; } >&5
2723  (eval "$ac_try") 2>&5
2724  ac_status=$?
2725  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2726  test $ac_status = 0; }; }; then :
2727  ac_retval=0
2728else
2729  $as_echo "$as_me: program exited with status $ac_status" >&5
2730       $as_echo "$as_me: failed program was:" >&5
2731sed 's/^/| /' conftest.$ac_ext >&5
2732
2733       ac_retval=$ac_status
2734fi
2735  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2736  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2737  as_fn_set_status $ac_retval
2738
2739} # ac_fn_cxx_try_run
2740
2741# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2742# ---------------------------------------------------------
2743# Tests whether HEADER exists and can be compiled using the include files in
2744# INCLUDES, setting the cache variable VAR accordingly.
2745ac_fn_cxx_check_header_compile ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2749$as_echo_n "checking for $2... " >&6; }
2750if eval \${$3+:} false; then :
2751  $as_echo_n "(cached) " >&6
2752else
2753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754/* end confdefs.h.  */
2755$4
2756#include <$2>
2757_ACEOF
2758if ac_fn_cxx_try_compile "$LINENO"; then :
2759  eval "$3=yes"
2760else
2761  eval "$3=no"
2762fi
2763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2764fi
2765eval ac_res=\$$3
2766	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2767$as_echo "$ac_res" >&6; }
2768  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2769
2770} # ac_fn_cxx_check_header_compile
2771
2772# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2773# ----------------------------------------------
2774# Tries to find the compile-time value of EXPR in a program that includes
2775# INCLUDES, setting VAR accordingly. Returns whether the value could be
2776# computed
2777ac_fn_cxx_compute_int ()
2778{
2779  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780  if test "$cross_compiling" = yes; then
2781    # Depending upon the size, compute the lo and hi bounds.
2782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2783/* end confdefs.h.  */
2784$4
2785int
2786main ()
2787{
2788static int test_array [1 - 2 * !(($2) >= 0)];
2789test_array [0] = 0;
2790return test_array [0];
2791
2792  ;
2793  return 0;
2794}
2795_ACEOF
2796if ac_fn_cxx_try_compile "$LINENO"; then :
2797  ac_lo=0 ac_mid=0
2798  while :; do
2799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h.  */
2801$4
2802int
2803main ()
2804{
2805static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2806test_array [0] = 0;
2807return test_array [0];
2808
2809  ;
2810  return 0;
2811}
2812_ACEOF
2813if ac_fn_cxx_try_compile "$LINENO"; then :
2814  ac_hi=$ac_mid; break
2815else
2816  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2817			if test $ac_lo -le $ac_mid; then
2818			  ac_lo= ac_hi=
2819			  break
2820			fi
2821			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2822fi
2823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2824  done
2825else
2826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827/* end confdefs.h.  */
2828$4
2829int
2830main ()
2831{
2832static int test_array [1 - 2 * !(($2) < 0)];
2833test_array [0] = 0;
2834return test_array [0];
2835
2836  ;
2837  return 0;
2838}
2839_ACEOF
2840if ac_fn_cxx_try_compile "$LINENO"; then :
2841  ac_hi=-1 ac_mid=-1
2842  while :; do
2843    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2844/* end confdefs.h.  */
2845$4
2846int
2847main ()
2848{
2849static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2850test_array [0] = 0;
2851return test_array [0];
2852
2853  ;
2854  return 0;
2855}
2856_ACEOF
2857if ac_fn_cxx_try_compile "$LINENO"; then :
2858  ac_lo=$ac_mid; break
2859else
2860  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2861			if test $ac_mid -le $ac_hi; then
2862			  ac_lo= ac_hi=
2863			  break
2864			fi
2865			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868  done
2869else
2870  ac_lo= ac_hi=
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873fi
2874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875# Binary search between lo and hi bounds.
2876while test "x$ac_lo" != "x$ac_hi"; do
2877  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879/* end confdefs.h.  */
2880$4
2881int
2882main ()
2883{
2884static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2885test_array [0] = 0;
2886return test_array [0];
2887
2888  ;
2889  return 0;
2890}
2891_ACEOF
2892if ac_fn_cxx_try_compile "$LINENO"; then :
2893  ac_hi=$ac_mid
2894else
2895  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2896fi
2897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898done
2899case $ac_lo in #((
2900?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2901'') ac_retval=1 ;;
2902esac
2903  else
2904    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2905/* end confdefs.h.  */
2906$4
2907static long int longval () { return $2; }
2908static unsigned long int ulongval () { return $2; }
2909#include <stdio.h>
2910#include <stdlib.h>
2911int
2912main ()
2913{
2914
2915  FILE *f = fopen ("conftest.val", "w");
2916  if (! f)
2917    return 1;
2918  if (($2) < 0)
2919    {
2920      long int i = longval ();
2921      if (i != ($2))
2922	return 1;
2923      fprintf (f, "%ld", i);
2924    }
2925  else
2926    {
2927      unsigned long int i = ulongval ();
2928      if (i != ($2))
2929	return 1;
2930      fprintf (f, "%lu", i);
2931    }
2932  /* Do not output a trailing newline, as this causes \r\n confusion
2933     on some platforms.  */
2934  return ferror (f) || fclose (f) != 0;
2935
2936  ;
2937  return 0;
2938}
2939_ACEOF
2940if ac_fn_cxx_try_run "$LINENO"; then :
2941  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2942else
2943  ac_retval=1
2944fi
2945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2946  conftest.$ac_objext conftest.beam conftest.$ac_ext
2947rm -f conftest.val
2948
2949  fi
2950  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2951  as_fn_set_status $ac_retval
2952
2953} # ac_fn_cxx_compute_int
2954
2955# ac_fn_cxx_try_link LINENO
2956# -------------------------
2957# Try to link conftest.$ac_ext, and return whether this succeeded.
2958ac_fn_cxx_try_link ()
2959{
2960  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2961  rm -f conftest.$ac_objext conftest$ac_exeext
2962  if { { ac_try="$ac_link"
2963case "(($ac_try" in
2964  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2965  *) ac_try_echo=$ac_try;;
2966esac
2967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2968$as_echo "$ac_try_echo"; } >&5
2969  (eval "$ac_link") 2>conftest.err
2970  ac_status=$?
2971  if test -s conftest.err; then
2972    grep -v '^ *+' conftest.err >conftest.er1
2973    cat conftest.er1 >&5
2974    mv -f conftest.er1 conftest.err
2975  fi
2976  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2977  test $ac_status = 0; } && {
2978	 test -z "$ac_cxx_werror_flag" ||
2979	 test ! -s conftest.err
2980       } && test -s conftest$ac_exeext && {
2981	 test "$cross_compiling" = yes ||
2982	 test -x conftest$ac_exeext
2983       }; then :
2984  ac_retval=0
2985else
2986  $as_echo "$as_me: failed program was:" >&5
2987sed 's/^/| /' conftest.$ac_ext >&5
2988
2989	ac_retval=1
2990fi
2991  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2992  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2993  # interfere with the next link command; also delete a directory that is
2994  # left behind by Apple's compiler.  We do this before executing the actions.
2995  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2996  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2997  as_fn_set_status $ac_retval
2998
2999} # ac_fn_cxx_try_link
3000
3001# ac_fn_cxx_check_func LINENO FUNC VAR
3002# ------------------------------------
3003# Tests whether FUNC exists, setting the cache variable VAR accordingly
3004ac_fn_cxx_check_func ()
3005{
3006  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3008$as_echo_n "checking for $2... " >&6; }
3009if eval \${$3+:} false; then :
3010  $as_echo_n "(cached) " >&6
3011else
3012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3013/* end confdefs.h.  */
3014/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3015   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3016#define $2 innocuous_$2
3017
3018/* System header to define __stub macros and hopefully few prototypes,
3019    which can conflict with char $2 (); below.
3020    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3021    <limits.h> exists even on freestanding compilers.  */
3022
3023#ifdef __STDC__
3024# include <limits.h>
3025#else
3026# include <assert.h>
3027#endif
3028
3029#undef $2
3030
3031/* Override any GCC internal prototype to avoid an error.
3032   Use char because int might match the return type of a GCC
3033   builtin and then its argument prototype would still apply.  */
3034#ifdef __cplusplus
3035extern "C"
3036#endif
3037char $2 ();
3038/* The GNU C library defines this for functions which it implements
3039    to always fail with ENOSYS.  Some functions are actually named
3040    something starting with __ and the normal name is an alias.  */
3041#if defined __stub_$2 || defined __stub___$2
3042choke me
3043#endif
3044
3045int
3046main ()
3047{
3048return $2 ();
3049  ;
3050  return 0;
3051}
3052_ACEOF
3053if ac_fn_cxx_try_link "$LINENO"; then :
3054  eval "$3=yes"
3055else
3056  eval "$3=no"
3057fi
3058rm -f core conftest.err conftest.$ac_objext \
3059    conftest$ac_exeext conftest.$ac_ext
3060fi
3061eval ac_res=\$$3
3062	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3063$as_echo "$ac_res" >&6; }
3064  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3065
3066} # ac_fn_cxx_check_func
3067
3068# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3069# -------------------------------------------------------
3070# Tests whether HEADER exists and can be compiled using the include files in
3071# INCLUDES, setting the cache variable VAR accordingly.
3072ac_fn_c_check_header_compile ()
3073{
3074  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3076$as_echo_n "checking for $2... " >&6; }
3077if eval \${$3+:} false; then :
3078  $as_echo_n "(cached) " >&6
3079else
3080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3081/* end confdefs.h.  */
3082$4
3083#include <$2>
3084_ACEOF
3085if ac_fn_c_try_compile "$LINENO"; then :
3086  eval "$3=yes"
3087else
3088  eval "$3=no"
3089fi
3090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3091fi
3092eval ac_res=\$$3
3093	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3094$as_echo "$ac_res" >&6; }
3095  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3096
3097} # ac_fn_c_check_header_compile
3098cat >config.log <<_ACEOF
3099This file contains any messages produced by compilers while
3100running configure, to aid debugging if configure makes a mistake.
3101
3102It was created by OpenJDK $as_me jdk9, which was
3103generated by GNU Autoconf 2.69.  Invocation command line was
3104
3105  $ $0 $@
3106
3107_ACEOF
3108exec 5>>config.log
3109{
3110cat <<_ASUNAME
3111## --------- ##
3112## Platform. ##
3113## --------- ##
3114
3115hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3116uname -m = `(uname -m) 2>/dev/null || echo unknown`
3117uname -r = `(uname -r) 2>/dev/null || echo unknown`
3118uname -s = `(uname -s) 2>/dev/null || echo unknown`
3119uname -v = `(uname -v) 2>/dev/null || echo unknown`
3120
3121/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3122/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3123
3124/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3125/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3126/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3127/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3128/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3129/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3130/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3131
3132_ASUNAME
3133
3134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3135for as_dir in $PATH
3136do
3137  IFS=$as_save_IFS
3138  test -z "$as_dir" && as_dir=.
3139    $as_echo "PATH: $as_dir"
3140  done
3141IFS=$as_save_IFS
3142
3143} >&5
3144
3145cat >&5 <<_ACEOF
3146
3147
3148## ----------- ##
3149## Core tests. ##
3150## ----------- ##
3151
3152_ACEOF
3153
3154
3155# Keep a trace of the command line.
3156# Strip out --no-create and --no-recursion so they do not pile up.
3157# Strip out --silent because we don't want to record it for future runs.
3158# Also quote any args containing shell meta-characters.
3159# Make two passes to allow for proper duplicate-argument suppression.
3160ac_configure_args=
3161ac_configure_args0=
3162ac_configure_args1=
3163ac_must_keep_next=false
3164for ac_pass in 1 2
3165do
3166  for ac_arg
3167  do
3168    case $ac_arg in
3169    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3170    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3171    | -silent | --silent | --silen | --sile | --sil)
3172      continue ;;
3173    *\'*)
3174      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3175    esac
3176    case $ac_pass in
3177    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3178    2)
3179      as_fn_append ac_configure_args1 " '$ac_arg'"
3180      if test $ac_must_keep_next = true; then
3181	ac_must_keep_next=false # Got value, back to normal.
3182      else
3183	case $ac_arg in
3184	  *=* | --config-cache | -C | -disable-* | --disable-* \
3185	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3186	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3187	  | -with-* | --with-* | -without-* | --without-* | --x)
3188	    case "$ac_configure_args0 " in
3189	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3190	    esac
3191	    ;;
3192	  -* ) ac_must_keep_next=true ;;
3193	esac
3194      fi
3195      as_fn_append ac_configure_args " '$ac_arg'"
3196      ;;
3197    esac
3198  done
3199done
3200{ ac_configure_args0=; unset ac_configure_args0;}
3201{ ac_configure_args1=; unset ac_configure_args1;}
3202
3203# When interrupted or exit'd, cleanup temporary files, and complete
3204# config.log.  We remove comments because anyway the quotes in there
3205# would cause problems or look ugly.
3206# WARNING: Use '\'' to represent an apostrophe within the trap.
3207# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3208trap 'exit_status=$?
3209  # Save into config.log some information that might help in debugging.
3210  {
3211    echo
3212
3213    $as_echo "## ---------------- ##
3214## Cache variables. ##
3215## ---------------- ##"
3216    echo
3217    # The following way of writing the cache mishandles newlines in values,
3218(
3219  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3220    eval ac_val=\$$ac_var
3221    case $ac_val in #(
3222    *${as_nl}*)
3223      case $ac_var in #(
3224      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3225$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3226      esac
3227      case $ac_var in #(
3228      _ | IFS | as_nl) ;; #(
3229      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3230      *) { eval $ac_var=; unset $ac_var;} ;;
3231      esac ;;
3232    esac
3233  done
3234  (set) 2>&1 |
3235    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3236    *${as_nl}ac_space=\ *)
3237      sed -n \
3238	"s/'\''/'\''\\\\'\'''\''/g;
3239	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3240      ;; #(
3241    *)
3242      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3243      ;;
3244    esac |
3245    sort
3246)
3247    echo
3248
3249    $as_echo "## ----------------- ##
3250## Output variables. ##
3251## ----------------- ##"
3252    echo
3253    for ac_var in $ac_subst_vars
3254    do
3255      eval ac_val=\$$ac_var
3256      case $ac_val in
3257      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3258      esac
3259      $as_echo "$ac_var='\''$ac_val'\''"
3260    done | sort
3261    echo
3262
3263    if test -n "$ac_subst_files"; then
3264      $as_echo "## ------------------- ##
3265## File substitutions. ##
3266## ------------------- ##"
3267      echo
3268      for ac_var in $ac_subst_files
3269      do
3270	eval ac_val=\$$ac_var
3271	case $ac_val in
3272	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3273	esac
3274	$as_echo "$ac_var='\''$ac_val'\''"
3275      done | sort
3276      echo
3277    fi
3278
3279    if test -s confdefs.h; then
3280      $as_echo "## ----------- ##
3281## confdefs.h. ##
3282## ----------- ##"
3283      echo
3284      cat confdefs.h
3285      echo
3286    fi
3287    test "$ac_signal" != 0 &&
3288      $as_echo "$as_me: caught signal $ac_signal"
3289    $as_echo "$as_me: exit $exit_status"
3290  } >&5
3291  rm -f core *.core core.conftest.* &&
3292    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3293    exit $exit_status
3294' 0
3295for ac_signal in 1 2 13 15; do
3296  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3297done
3298ac_signal=0
3299
3300# confdefs.h avoids OS command line length limits that DEFS can exceed.
3301rm -f -r conftest* confdefs.h
3302
3303$as_echo "/* confdefs.h */" > confdefs.h
3304
3305# Predefined preprocessor variables.
3306
3307cat >>confdefs.h <<_ACEOF
3308#define PACKAGE_NAME "$PACKAGE_NAME"
3309_ACEOF
3310
3311cat >>confdefs.h <<_ACEOF
3312#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3313_ACEOF
3314
3315cat >>confdefs.h <<_ACEOF
3316#define PACKAGE_VERSION "$PACKAGE_VERSION"
3317_ACEOF
3318
3319cat >>confdefs.h <<_ACEOF
3320#define PACKAGE_STRING "$PACKAGE_STRING"
3321_ACEOF
3322
3323cat >>confdefs.h <<_ACEOF
3324#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3325_ACEOF
3326
3327cat >>confdefs.h <<_ACEOF
3328#define PACKAGE_URL "$PACKAGE_URL"
3329_ACEOF
3330
3331
3332# Let the site file select an alternate cache file if it wants to.
3333# Prefer an explicitly selected file to automatically selected ones.
3334ac_site_file1=NONE
3335ac_site_file2=NONE
3336if test -n "$CONFIG_SITE"; then
3337  # We do not want a PATH search for config.site.
3338  case $CONFIG_SITE in #((
3339    -*)  ac_site_file1=./$CONFIG_SITE;;
3340    */*) ac_site_file1=$CONFIG_SITE;;
3341    *)   ac_site_file1=./$CONFIG_SITE;;
3342  esac
3343elif test "x$prefix" != xNONE; then
3344  ac_site_file1=$prefix/share/config.site
3345  ac_site_file2=$prefix/etc/config.site
3346else
3347  ac_site_file1=$ac_default_prefix/share/config.site
3348  ac_site_file2=$ac_default_prefix/etc/config.site
3349fi
3350for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3351do
3352  test "x$ac_site_file" = xNONE && continue
3353  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3354    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3355$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3356    sed 's/^/| /' "$ac_site_file" >&5
3357    . "$ac_site_file" \
3358      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3360as_fn_error $? "failed to load site script $ac_site_file
3361See \`config.log' for more details" "$LINENO" 5; }
3362  fi
3363done
3364
3365if test -r "$cache_file"; then
3366  # Some versions of bash will fail to source /dev/null (special files
3367  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3368  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3369    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3370$as_echo "$as_me: loading cache $cache_file" >&6;}
3371    case $cache_file in
3372      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3373      *)                      . "./$cache_file";;
3374    esac
3375  fi
3376else
3377  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3378$as_echo "$as_me: creating cache $cache_file" >&6;}
3379  >$cache_file
3380fi
3381
3382# Check that the precious variables saved in the cache have kept the same
3383# value.
3384ac_cache_corrupted=false
3385for ac_var in $ac_precious_vars; do
3386  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3387  eval ac_new_set=\$ac_env_${ac_var}_set
3388  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3389  eval ac_new_val=\$ac_env_${ac_var}_value
3390  case $ac_old_set,$ac_new_set in
3391    set,)
3392      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3393$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3394      ac_cache_corrupted=: ;;
3395    ,set)
3396      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3397$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3398      ac_cache_corrupted=: ;;
3399    ,);;
3400    *)
3401      if test "x$ac_old_val" != "x$ac_new_val"; then
3402	# differences in whitespace do not lead to failure.
3403	ac_old_val_w=`echo x $ac_old_val`
3404	ac_new_val_w=`echo x $ac_new_val`
3405	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3406	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3407$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3408	  ac_cache_corrupted=:
3409	else
3410	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3411$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3412	  eval $ac_var=\$ac_old_val
3413	fi
3414	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3415$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3416	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3417$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3418      fi;;
3419  esac
3420  # Pass precious variables to config.status.
3421  if test "$ac_new_set" = set; then
3422    case $ac_new_val in
3423    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3424    *) ac_arg=$ac_var=$ac_new_val ;;
3425    esac
3426    case " $ac_configure_args " in
3427      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3428      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3429    esac
3430  fi
3431done
3432if $ac_cache_corrupted; then
3433  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3434$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3435  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3436$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3437  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3438fi
3439## -------------------- ##
3440## Main body of script. ##
3441## -------------------- ##
3442
3443ac_ext=c
3444ac_cpp='$CPP $CPPFLAGS'
3445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3447ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448
3449
3450
3451ac_aux_dir=
3452for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3453  if test -f "$ac_dir/install-sh"; then
3454    ac_aux_dir=$ac_dir
3455    ac_install_sh="$ac_aux_dir/install-sh -c"
3456    break
3457  elif test -f "$ac_dir/install.sh"; then
3458    ac_aux_dir=$ac_dir
3459    ac_install_sh="$ac_aux_dir/install.sh -c"
3460    break
3461  elif test -f "$ac_dir/shtool"; then
3462    ac_aux_dir=$ac_dir
3463    ac_install_sh="$ac_aux_dir/shtool install -c"
3464    break
3465  fi
3466done
3467if test -z "$ac_aux_dir"; then
3468  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
3469fi
3470
3471# These three variables are undocumented and unsupported,
3472# and are intended to be withdrawn in a future Autoconf release.
3473# They can cause serious problems if a builder's source tree is in a directory
3474# whose full name contains unusual characters.
3475ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3476ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3477ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3478
3479
3480# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3481
3482#
3483# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3484# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3485#
3486# This code is free software; you can redistribute it and/or modify it
3487# under the terms of the GNU General Public License version 2 only, as
3488# published by the Free Software Foundation.  Oracle designates this
3489# particular file as subject to the "Classpath" exception as provided
3490# by Oracle in the LICENSE file that accompanied this code.
3491#
3492# This code is distributed in the hope that it will be useful, but WITHOUT
3493# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3494# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3495# version 2 for more details (a copy is included in the LICENSE file that
3496# accompanied this code).
3497#
3498# You should have received a copy of the GNU General Public License version
3499# 2 along with this work; if not, write to the Free Software Foundation,
3500# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3501#
3502# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3503# or visit www.oracle.com if you need additional information or have any
3504# questions.
3505#
3506
3507#
3508# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3509#
3510# This program is free software; you can redistribute it and/or modify
3511# it under the terms of the GNU General Public License as published by
3512# the Free Software Foundation; either version 2 of the License, or
3513# (at your option) any later version.
3514#
3515# This program is distributed in the hope that it will be useful, but
3516# WITHOUT ANY WARRANTY; without even the implied warranty of
3517# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3518# General Public License for more details.
3519#
3520# You should have received a copy of the GNU General Public License
3521# along with this program; if not, write to the Free Software
3522# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3523#
3524# As a special exception to the GNU General Public License, if you
3525# distribute this file as part of a program that contains a
3526# configuration script generated by Autoconf, you may include it under
3527# the same distribution terms that you use for the rest of that program.
3528
3529# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3530# ----------------------------------
3531# PKG_PROG_PKG_CONFIG
3532
3533# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3534#
3535# Check to see whether a particular set of modules exists.  Similar
3536# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3537#
3538#
3539# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3540# this or PKG_CHECK_MODULES is called, or make sure to call
3541# PKG_CHECK_EXISTS manually
3542# --------------------------------------------------------------
3543
3544
3545
3546# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3547# ---------------------------------------------
3548# _PKG_CONFIG
3549
3550# _PKG_SHORT_ERRORS_SUPPORTED
3551# -----------------------------
3552# _PKG_SHORT_ERRORS_SUPPORTED
3553
3554
3555# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3556# [ACTION-IF-NOT-FOUND])
3557#
3558#
3559# Note that if there is a possibility the first call to
3560# PKG_CHECK_MODULES might not happen, you should be sure to include an
3561# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3562#
3563#
3564# --------------------------------------------------------------
3565# PKG_CHECK_MODULES
3566
3567
3568# Include these first...
3569#
3570# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3571# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3572#
3573# This code is free software; you can redistribute it and/or modify it
3574# under the terms of the GNU General Public License version 2 only, as
3575# published by the Free Software Foundation.  Oracle designates this
3576# particular file as subject to the "Classpath" exception as provided
3577# by Oracle in the LICENSE file that accompanied this code.
3578#
3579# This code is distributed in the hope that it will be useful, but WITHOUT
3580# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3581# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3582# version 2 for more details (a copy is included in the LICENSE file that
3583# accompanied this code).
3584#
3585# You should have received a copy of the GNU General Public License version
3586# 2 along with this work; if not, write to the Free Software Foundation,
3587# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3588#
3589# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3590# or visit www.oracle.com if you need additional information or have any
3591# questions.
3592#
3593
3594# Create a function/macro that takes a series of named arguments. The call is
3595# similar to AC_DEFUN, but the setup of the function looks like this:
3596# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3597# ... do something
3598#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3599# ])
3600# A star (*) in front of a named argument means that it is required and it's
3601# presence will be verified. To pass e.g. the first value as a normal indexed
3602# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3603# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3604# "ARG_FOO".
3605#
3606# The generated function can be called like this:
3607# MYFUNC(FOO: [foo-val],
3608#     BAR: [
3609#         $ECHO hello world
3610#     ])
3611# Note that the argument value must start on the same line as the argument name.
3612#
3613# Argument 1: Name of the function to define
3614# Argument 2: List of legal named arguments, with a * prefix for required arguments
3615# Argument 3: Argument array to treat as named, typically $@
3616# Argument 4: The main function body
3617
3618
3619# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3620# If so, then append $1 to $2 \
3621# Also set JVM_ARG_OK to true/false depending on outcome.
3622
3623
3624# Appends a string to a path variable, only adding the : when needed.
3625
3626
3627# Prepends a string to a path variable, only adding the : when needed.
3628
3629
3630# This will make sure the given variable points to a full and proper
3631# path. This means:
3632# 1) There will be no spaces in the path. On unix platforms,
3633#    spaces in the path will result in an error. On Windows,
3634#    the path will be rewritten using short-style to be space-free.
3635# 2) The path will be absolute, and it will be in unix-style (on
3636#     cygwin).
3637# $1: The name of the variable to fix
3638
3639
3640# This will make sure the given variable points to a executable
3641# with a full and proper path. This means:
3642# 1) There will be no spaces in the path. On unix platforms,
3643#    spaces in the path will result in an error. On Windows,
3644#    the path will be rewritten using short-style to be space-free.
3645# 2) The path will be absolute, and it will be in unix-style (on
3646#     cygwin).
3647# Any arguments given to the executable is preserved.
3648# If the input variable does not have a directory specification, then
3649# it need to be in the PATH.
3650# $1: The name of the variable to fix
3651
3652
3653
3654
3655# Register a --with argument but mark it as deprecated
3656# $1: The name of the with argument to deprecate, not including --with-
3657
3658
3659# Register a --enable argument but mark it as deprecated
3660# $1: The name of the with argument to deprecate, not including --enable-
3661# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3662# $3: Messages to user.
3663
3664
3665
3666
3667# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3668# $1: variable to check
3669
3670
3671# Check that there are no unprocessed overridden variables left.
3672# If so, they are an incorrect argument and we will exit with an error.
3673
3674
3675# Setup a tool for the given variable. If correctly specified by the user,
3676# use that value, otherwise search for the tool using the supplied code snippet.
3677# $1: variable to set
3678# $2: code snippet to call to look for the tool
3679# $3: code snippet to call if variable was used to find tool
3680
3681
3682# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3683# $1: variable to set
3684# $2: executable name (or list of names) to look for
3685# $3: [path]
3686
3687
3688# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3689# $1: variable to set
3690# $2: executable name (or list of names) to look for
3691
3692
3693# Like BASIC_PATH_PROGS but fails if no tool was found.
3694# $1: variable to set
3695# $2: executable name (or list of names) to look for
3696# $3: [path]
3697
3698
3699# Like BASIC_SETUP_TOOL but fails if no tool was found.
3700# $1: variable to set
3701# $2: autoconf macro to call to look for the special tool
3702
3703
3704# Setup the most fundamental tools that relies on not much else to set up,
3705# but is used by much of the early bootstrap code.
3706
3707
3708# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3709
3710
3711# Evaluates platform specific overrides for devkit variables.
3712# $1: Name of variable
3713
3714
3715
3716
3717
3718
3719#%%% Simple tools %%%
3720
3721# Check if we have found a usable version of make
3722# $1: the path to a potential make binary (or empty)
3723# $2: the description on how we found this
3724
3725
3726
3727
3728# Goes looking for a usable version of GNU make.
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739# Check if build directory is on local disk. If not possible to determine,
3740# we prefer to claim it's local.
3741# Argument 1: directory to test
3742# Argument 2: what to do if it is on local disk
3743# Argument 3: what to do otherwise (remote disk or failure)
3744
3745
3746# Check that source files have basic read permissions set. This might
3747# not be the case in cygwin in certain conditions.
3748
3749
3750
3751
3752# Check for support for specific options in bash
3753
3754
3755################################################################################
3756#
3757# Default make target
3758#
3759
3760
3761# Code to run after AC_OUTPUT
3762
3763
3764#
3765# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3766# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3767#
3768# This code is free software; you can redistribute it and/or modify it
3769# under the terms of the GNU General Public License version 2 only, as
3770# published by the Free Software Foundation.  Oracle designates this
3771# particular file as subject to the "Classpath" exception as provided
3772# by Oracle in the LICENSE file that accompanied this code.
3773#
3774# This code is distributed in the hope that it will be useful, but WITHOUT
3775# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3776# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3777# version 2 for more details (a copy is included in the LICENSE file that
3778# accompanied this code).
3779#
3780# You should have received a copy of the GNU General Public License version
3781# 2 along with this work; if not, write to the Free Software Foundation,
3782# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3783#
3784# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3785# or visit www.oracle.com if you need additional information or have any
3786# questions.
3787#
3788
3789
3790
3791
3792
3793# Helper function which possibly converts a path using DOS-style short mode.
3794# If so, the updated path is stored in $new_path.
3795# $1: The path to check
3796
3797
3798# Helper function which possibly converts a path using DOS-style short mode.
3799# If so, the updated path is stored in $new_path.
3800# $1: The path to check
3801
3802
3803# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3804# and could probably be heavily simplified. However, all changes in this
3805# area tend to need lot of testing in different scenarios, and in lack of
3806# proper unit testing, cleaning this up has not been deemed worth the effort
3807# at the moment.
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3818
3819
3820
3821
3822# ... then the rest
3823#
3824# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3826#
3827# This code is free software; you can redistribute it and/or modify it
3828# under the terms of the GNU General Public License version 2 only, as
3829# published by the Free Software Foundation.  Oracle designates this
3830# particular file as subject to the "Classpath" exception as provided
3831# by Oracle in the LICENSE file that accompanied this code.
3832#
3833# This code is distributed in the hope that it will be useful, but WITHOUT
3834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3836# version 2 for more details (a copy is included in the LICENSE file that
3837# accompanied this code).
3838#
3839# You should have received a copy of the GNU General Public License version
3840# 2 along with this work; if not, write to the Free Software Foundation,
3841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3842#
3843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3844# or visit www.oracle.com if you need additional information or have any
3845# questions.
3846#
3847
3848########################################################################
3849# This file handles detection of the Boot JDK. The Boot JDK detection
3850# process has been developed as a response to solve a complex real-world
3851# problem. Initially, it was simple, but it has grown as platform after
3852# platform, idiosyncracy after idiosyncracy has been supported.
3853#
3854# The basic idea is this:
3855# 1) You need an acceptable *) JDK to use as a Boot JDK
3856# 2) There are several ways to locate a JDK, that are mostly platform
3857#    dependent **)
3858# 3) You can have multiple JDKs installed
3859# 4) If possible, configure should try to dig out an acceptable JDK
3860#    automatically, without having to resort to command-line options
3861#
3862# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3863#     javac) and not a JRE, etc.
3864#
3865# **) On Windows we typically use a well-known path.
3866#     On MacOSX we typically use the tool java_home.
3867#     On Linux we typically find javac in the $PATH, and then follow a
3868#     chain of symlinks that often ends up in a real JDK.
3869#
3870# This leads to the code where we check in different ways to locate a
3871# JDK, and if one is found, check if it is acceptable. If not, we print
3872# our reasons for rejecting it (useful when debugging non-working
3873# configure situations) and continue checking the next one.
3874########################################################################
3875
3876# Execute the check given as argument, and verify the result
3877# If the Boot JDK was previously found, do nothing
3878# $1 A command line (typically autoconf macro) to execute
3879
3880
3881# Test: Is bootjdk explicitly set by command line arguments?
3882
3883
3884# Test: Is $JAVA_HOME set?
3885
3886
3887# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3888
3889
3890# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3891# $1: Argument to the java_home binary (optional)
3892
3893
3894# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3895
3896
3897# Look for a jdk in the given path. If there are multiple, try to select the newest.
3898# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3899# $1 = Path to directory containing jdk installations.
3900# $2 = String to append to the found JDK directory to get the proper JDK home
3901
3902
3903# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3904# environmental variable as base for where to look.
3905# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3906
3907
3908# Test: Is there a JDK installed in default, well-known locations?
3909
3910
3911# Check that a command-line tool in the Boot JDK is correct
3912# $1 = name of variable to assign
3913# $2 = name of binary
3914
3915
3916###############################################################################
3917#
3918# We need a Boot JDK to bootstrap the build.
3919#
3920
3921
3922
3923
3924
3925# BUILD_JDK: the location of the latest JDK that can run
3926#   on the host system and supports the target class file version
3927#   generated in this JDK build.  This variable should only be
3928#   used after the launchers are built.
3929#
3930
3931# Execute the check given as argument, and verify the result.
3932# If the JDK was previously found, do nothing.
3933# $1 A command line (typically autoconf macro) to execute
3934
3935
3936# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3937# is different than the host system doing the build (e.g. cross-compilation),
3938# a special BUILD_JDK is built as part of the build process.  An external
3939# prebuilt BUILD_JDK can also be supplied.
3940
3941
3942#
3943# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3944# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3945#
3946# This code is free software; you can redistribute it and/or modify it
3947# under the terms of the GNU General Public License version 2 only, as
3948# published by the Free Software Foundation.  Oracle designates this
3949# particular file as subject to the "Classpath" exception as provided
3950# by Oracle in the LICENSE file that accompanied this code.
3951#
3952# This code is distributed in the hope that it will be useful, but WITHOUT
3953# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3954# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3955# version 2 for more details (a copy is included in the LICENSE file that
3956# accompanied this code).
3957#
3958# You should have received a copy of the GNU General Public License version
3959# 2 along with this work; if not, write to the Free Software Foundation,
3960# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3961#
3962# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3963# or visit www.oracle.com if you need additional information or have any
3964# questions.
3965#
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983################################################################################
3984#
3985# Runs icecc-create-env once and prints the error if it fails
3986#
3987# $1: arguments to icecc-create-env
3988# $2: log file
3989#
3990
3991
3992################################################################################
3993#
3994# Optionally enable distributed compilation of native code using icecc/icecream
3995#
3996
3997
3998
3999
4000
4001
4002
4003#
4004# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4005# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4006#
4007# This code is free software; you can redistribute it and/or modify it
4008# under the terms of the GNU General Public License version 2 only, as
4009# published by the Free Software Foundation.  Oracle designates this
4010# particular file as subject to the "Classpath" exception as provided
4011# by Oracle in the LICENSE file that accompanied this code.
4012#
4013# This code is distributed in the hope that it will be useful, but WITHOUT
4014# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4015# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4016# version 2 for more details (a copy is included in the LICENSE file that
4017# accompanied this code).
4018#
4019# You should have received a copy of the GNU General Public License version
4020# 2 along with this work; if not, write to the Free Software Foundation,
4021# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4022#
4023# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4024# or visit www.oracle.com if you need additional information or have any
4025# questions.
4026#
4027
4028################################################################################
4029#
4030# Setup ABI profile (for arm)
4031#
4032
4033
4034# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4035# corresponding configure arguments instead
4036
4037
4038# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4039# that configure can use them while detecting compilers.
4040# TOOLCHAIN_TYPE is available here.
4041# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4042
4043
4044
4045
4046
4047
4048# Documentation on common flags used for solstudio in HIGHEST.
4049#
4050# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4051#          done with care, there are some assumptions below that need to
4052#          be understood about the use of pointers, and IEEE behavior.
4053#
4054# -fns: Use non-standard floating point mode (not IEEE 754)
4055# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4056# -fsingle: Use single precision floating point with 'float'
4057# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4058#   (Source with excessing pointer casting and data access with mixed
4059#    pointer types are not recommended)
4060# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4061#   (If you expect perfect errno behavior, do not use this)
4062# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4063# -xrestrict: Pointer parameters to functions do not overlap
4064#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4065#    If you pass in multiple pointers to the same data, do not use this)
4066# -xlibmil: Inline some library routines
4067#   (If you expect perfect errno behavior, do not use this)
4068# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4069#   (If you expect perfect errno behavior, do not use this)
4070#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4071
4072    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4073    # Bug?
4074    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4075    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4076    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4077    #fi
4078
4079
4080
4081
4082
4083
4084################################################################################
4085# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4086#      conditionals against.
4087# $2 - Optional prefix for each variable defined.
4088
4089
4090# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4091#                                  IF_FALSE: [RUN-IF-FALSE])
4092# ------------------------------------------------------------
4093# Check that the C compiler supports an argument
4094
4095
4096
4097
4098# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4099#                                    IF_FALSE: [RUN-IF-FALSE])
4100# ------------------------------------------------------------
4101# Check that the C++ compiler supports an argument
4102
4103
4104
4105
4106# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4107#                                IF_FALSE: [RUN-IF-FALSE])
4108# ------------------------------------------------------------
4109# Check that the C and C++ compilers support an argument
4110
4111
4112
4113
4114# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4115#                                   IF_FALSE: [RUN-IF-FALSE])
4116# ------------------------------------------------------------
4117# Check that the linker support an argument
4118
4119
4120
4121
4122
4123
4124# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4125# Arguments:
4126# $1 - Optional prefix for each variable defined.
4127
4128
4129#
4130# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4131# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4132#
4133# This code is free software; you can redistribute it and/or modify it
4134# under the terms of the GNU General Public License version 2 only, as
4135# published by the Free Software Foundation.  Oracle designates this
4136# particular file as subject to the "Classpath" exception as provided
4137# by Oracle in the LICENSE file that accompanied this code.
4138#
4139# This code is distributed in the hope that it will be useful, but WITHOUT
4140# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4141# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4142# version 2 for more details (a copy is included in the LICENSE file that
4143# accompanied this code).
4144#
4145# You should have received a copy of the GNU General Public License version
4146# 2 along with this work; if not, write to the Free Software Foundation,
4147# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4148#
4149# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4150# or visit www.oracle.com if you need additional information or have any
4151# questions.
4152#
4153
4154
4155
4156
4157
4158cygwin_help() {
4159  case $1 in
4160    unzip)
4161      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4162      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4163      ;;
4164    zip)
4165      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4166      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4167      ;;
4168    make)
4169      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4170      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4171      ;;
4172    freetype)
4173      HELP_MSG="
4174The freetype library can now be build during the configure process.
4175Download the freetype sources and unpack them into an arbitrary directory:
4176
4177wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4178tar -xzf freetype-2.5.3.tar.gz
4179
4180Then run configure with '--with-freetype-src=<freetype_src>'. This will
4181automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4182builds or into '<freetype_src>/lib32' for 32-bit builds.
4183Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4184and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4185
4186Alternatively you can unpack the sources like this to use the default directory:
4187
4188tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4189      ;;
4190  esac
4191}
4192
4193msys_help() {
4194  PKGHANDLER_COMMAND=""
4195}
4196
4197apt_help() {
4198  case $1 in
4199    reduced)
4200      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4201    devkit)
4202      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4203    openjdk)
4204      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4205    alsa)
4206      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4207    cups)
4208      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4209    freetype)
4210      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4211    ffi)
4212      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4213    x11)
4214      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4215    ccache)
4216      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4217    dtrace)
4218      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4219    elf)
4220      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4221  esac
4222}
4223
4224yum_help() {
4225  case $1 in
4226    devkit)
4227      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4228    openjdk)
4229      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4230    alsa)
4231      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4232    cups)
4233      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4234    freetype)
4235      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4236    x11)
4237      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4238    ccache)
4239      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4240    elf)
4241      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4242  esac
4243}
4244
4245brew_help() {
4246  case $1 in
4247    openjdk)
4248      PKGHANDLER_COMMAND="brew cask install java" ;;
4249    freetype)
4250      PKGHANDLER_COMMAND="brew install freetype" ;;
4251    ccache)
4252      PKGHANDLER_COMMAND="brew install ccache" ;;
4253  esac
4254}
4255
4256port_help() {
4257  PKGHANDLER_COMMAND=""
4258}
4259
4260pkgutil_help() {
4261  PKGHANDLER_COMMAND=""
4262}
4263
4264pkgadd_help() {
4265  PKGHANDLER_COMMAND=""
4266}
4267
4268# This function will check if we're called from the "configure" wrapper while
4269# printing --help. If so, we will print out additional information that can
4270# only be extracted within the autoconf script, and then exit. This must be
4271# called at the very beginning in configure.ac.
4272
4273
4274
4275
4276
4277
4278#
4279# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4280# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4281#
4282# This code is free software; you can redistribute it and/or modify it
4283# under the terms of the GNU General Public License version 2 only, as
4284# published by the Free Software Foundation.  Oracle designates this
4285# particular file as subject to the "Classpath" exception as provided
4286# by Oracle in the LICENSE file that accompanied this code.
4287#
4288# This code is distributed in the hope that it will be useful, but WITHOUT
4289# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4290# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4291# version 2 for more details (a copy is included in the LICENSE file that
4292# accompanied this code).
4293#
4294# You should have received a copy of the GNU General Public License version
4295# 2 along with this work; if not, write to the Free Software Foundation,
4296# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4297#
4298# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4299# or visit www.oracle.com if you need additional information or have any
4300# questions.
4301#
4302
4303# All valid JVM features, regardless of platform
4304VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4305    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4306    static-build link-time-opt aot"
4307
4308# All valid JVM variants
4309VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4310
4311###############################################################################
4312# Check if the specified JVM variant should be built. To be used in shell if
4313# constructs, like this:
4314# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4315#
4316# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4317
4318# Definition kept in one line to allow inlining in if statements.
4319# Additional [] needed to keep m4 from mangling shell constructs.
4320
4321
4322###############################################################################
4323# Check if the specified JVM features are explicitly enabled. To be used in
4324# shell if constructs, like this:
4325# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4326#
4327# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4328
4329# Definition kept in one line to allow inlining in if statements.
4330# Additional [] needed to keep m4 from mangling shell constructs.
4331
4332
4333###############################################################################
4334# Check which variants of the JVM that we want to build. Available variants are:
4335#   server: normal interpreter, and a tiered C1/C2 compiler
4336#   client: normal interpreter, and C1 (no C2 compiler)
4337#   minimal: reduced form of client with optional features stripped out
4338#   core: normal interpreter only, no compiler
4339#   zero: C++ based interpreter only, no compiler
4340#   zeroshark: C++ based interpreter, and a llvm-based compiler
4341#   custom: baseline JVM with no default features
4342#
4343
4344
4345###############################################################################
4346# Check if dtrace should be enabled and has all prerequisites present.
4347#
4348
4349
4350################################################################################
4351# Check if AOT should be enabled
4352#
4353
4354
4355###############################################################################
4356# Set up all JVM features for each JVM variant.
4357#
4358
4359
4360###############################################################################
4361# Validate JVM features once all setup is complete, including custom setup.
4362#
4363
4364
4365################################################################################
4366#
4367# Specify which sources will be used to build the 64-bit ARM port
4368#
4369# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4370# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4371#
4372
4373
4374
4375################################################################################
4376# Check if gtest should be built
4377#
4378
4379
4380#
4381# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4382# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4383#
4384# This code is free software; you can redistribute it and/or modify it
4385# under the terms of the GNU General Public License version 2 only, as
4386# published by the Free Software Foundation.  Oracle designates this
4387# particular file as subject to the "Classpath" exception as provided
4388# by Oracle in the LICENSE file that accompanied this code.
4389#
4390# This code is distributed in the hope that it will be useful, but WITHOUT
4391# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4392# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4393# version 2 for more details (a copy is included in the LICENSE file that
4394# accompanied this code).
4395#
4396# You should have received a copy of the GNU General Public License version
4397# 2 along with this work; if not, write to the Free Software Foundation,
4398# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4399#
4400# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4401# or visit www.oracle.com if you need additional information or have any
4402# questions.
4403#
4404
4405###############################################################################
4406# Check which variant of the JDK that we want to build.
4407# Currently we have:
4408#    normal:   standard edition
4409# but the custom make system may add other variants
4410#
4411# Effectively the JDK variant gives a name to a specific set of
4412# modules to compile into the JDK.
4413
4414
4415###############################################################################
4416# Set the debug level
4417#    release: no debug information, all optimizations, no asserts.
4418#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4419#    fastdebug: debug information (-g), all optimizations, all asserts
4420#    slowdebug: debug information (-g), no optimizations, all asserts
4421
4422
4423###############################################################################
4424#
4425# Should we build only OpenJDK even if closed sources are present?
4426#
4427
4428
4429
4430
4431###############################################################################
4432#
4433# Enable or disable the elliptic curve crypto implementation
4434#
4435
4436
4437
4438
4439################################################################################
4440#
4441# Gcov coverage data for hotspot
4442#
4443
4444
4445################################################################################
4446#
4447# Static build support.  When enabled will generate static
4448# libraries instead of shared libraries for all JDK libs.
4449#
4450
4451
4452################################################################################
4453#
4454# jlink options.
4455# We always keep packaged modules in JDK image.
4456#
4457
4458
4459################################################################################
4460#
4461# Check if building of the jtreg failure handler should be enabled.
4462#
4463
4464
4465################################################################################
4466#
4467# Enable or disable generation of the classlist at build time
4468#
4469
4470
4471#
4472# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4473# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4474#
4475# This code is free software; you can redistribute it and/or modify it
4476# under the terms of the GNU General Public License version 2 only, as
4477# published by the Free Software Foundation.  Oracle designates this
4478# particular file as subject to the "Classpath" exception as provided
4479# by Oracle in the LICENSE file that accompanied this code.
4480#
4481# This code is distributed in the hope that it will be useful, but WITHOUT
4482# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4483# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4484# version 2 for more details (a copy is included in the LICENSE file that
4485# accompanied this code).
4486#
4487# You should have received a copy of the GNU General Public License version
4488# 2 along with this work; if not, write to the Free Software Foundation,
4489# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4490#
4491# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4492# or visit www.oracle.com if you need additional information or have any
4493# questions.
4494#
4495
4496###############################################################################
4497#
4498# Setup version numbers
4499#
4500
4501# Verify that a given string represents a valid version number, and assign it
4502# to a variable.
4503
4504# Argument 1: the variable to assign to
4505# Argument 2: the value given by the user
4506
4507
4508
4509
4510#
4511# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4512# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4513#
4514# This code is free software; you can redistribute it and/or modify it
4515# under the terms of the GNU General Public License version 2 only, as
4516# published by the Free Software Foundation.  Oracle designates this
4517# particular file as subject to the "Classpath" exception as provided
4518# by Oracle in the LICENSE file that accompanied this code.
4519#
4520# This code is distributed in the hope that it will be useful, but WITHOUT
4521# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4522# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4523# version 2 for more details (a copy is included in the LICENSE file that
4524# accompanied this code).
4525#
4526# You should have received a copy of the GNU General Public License version
4527# 2 along with this work; if not, write to the Free Software Foundation,
4528# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4529#
4530# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4531# or visit www.oracle.com if you need additional information or have any
4532# questions.
4533#
4534
4535# Major library component reside in separate files.
4536#
4537# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4538# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4539#
4540# This code is free software; you can redistribute it and/or modify it
4541# under the terms of the GNU General Public License version 2 only, as
4542# published by the Free Software Foundation.  Oracle designates this
4543# particular file as subject to the "Classpath" exception as provided
4544# by Oracle in the LICENSE file that accompanied this code.
4545#
4546# This code is distributed in the hope that it will be useful, but WITHOUT
4547# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4548# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4549# version 2 for more details (a copy is included in the LICENSE file that
4550# accompanied this code).
4551#
4552# You should have received a copy of the GNU General Public License version
4553# 2 along with this work; if not, write to the Free Software Foundation,
4554# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4555#
4556# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4557# or visit www.oracle.com if you need additional information or have any
4558# questions.
4559#
4560
4561################################################################################
4562# Setup alsa (Advanced Linux Sound Architecture)
4563################################################################################
4564
4565
4566#
4567# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4569#
4570# This code is free software; you can redistribute it and/or modify it
4571# under the terms of the GNU General Public License version 2 only, as
4572# published by the Free Software Foundation.  Oracle designates this
4573# particular file as subject to the "Classpath" exception as provided
4574# by Oracle in the LICENSE file that accompanied this code.
4575#
4576# This code is distributed in the hope that it will be useful, but WITHOUT
4577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4579# version 2 for more details (a copy is included in the LICENSE file that
4580# accompanied this code).
4581#
4582# You should have received a copy of the GNU General Public License version
4583# 2 along with this work; if not, write to the Free Software Foundation,
4584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4585#
4586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4587# or visit www.oracle.com if you need additional information or have any
4588# questions.
4589#
4590
4591################################################################################
4592# Setup bundled libraries.
4593#
4594# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4595# OpenJDK repository. Default is to use these libraries as bundled, but they
4596# might be replaced by en external version by the user.
4597################################################################################
4598
4599
4600################################################################################
4601# Setup libjpeg
4602################################################################################
4603
4604
4605################################################################################
4606# Setup giflib
4607################################################################################
4608
4609
4610################################################################################
4611# Setup libpng
4612################################################################################
4613
4614
4615################################################################################
4616# Setup zlib
4617################################################################################
4618
4619
4620################################################################################
4621# Setup lcms (Little CMS)
4622################################################################################
4623
4624
4625#
4626# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4627# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4628#
4629# This code is free software; you can redistribute it and/or modify it
4630# under the terms of the GNU General Public License version 2 only, as
4631# published by the Free Software Foundation.  Oracle designates this
4632# particular file as subject to the "Classpath" exception as provided
4633# by Oracle in the LICENSE file that accompanied this code.
4634#
4635# This code is distributed in the hope that it will be useful, but WITHOUT
4636# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4637# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4638# version 2 for more details (a copy is included in the LICENSE file that
4639# accompanied this code).
4640#
4641# You should have received a copy of the GNU General Public License version
4642# 2 along with this work; if not, write to the Free Software Foundation,
4643# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4644#
4645# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4646# or visit www.oracle.com if you need additional information or have any
4647# questions.
4648#
4649
4650################################################################################
4651# Setup cups (Common Unix Printing System)
4652################################################################################
4653
4654
4655#
4656# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4657# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4658#
4659# This code is free software; you can redistribute it and/or modify it
4660# under the terms of the GNU General Public License version 2 only, as
4661# published by the Free Software Foundation.  Oracle designates this
4662# particular file as subject to the "Classpath" exception as provided
4663# by Oracle in the LICENSE file that accompanied this code.
4664#
4665# This code is distributed in the hope that it will be useful, but WITHOUT
4666# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4667# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4668# version 2 for more details (a copy is included in the LICENSE file that
4669# accompanied this code).
4670#
4671# You should have received a copy of the GNU General Public License version
4672# 2 along with this work; if not, write to the Free Software Foundation,
4673# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4674#
4675# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4676# or visit www.oracle.com if you need additional information or have any
4677# questions.
4678#
4679
4680################################################################################
4681# Setup libffi (Foreign Function Interface)
4682################################################################################
4683
4684
4685#
4686# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4687# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4688#
4689# This code is free software; you can redistribute it and/or modify it
4690# under the terms of the GNU General Public License version 2 only, as
4691# published by the Free Software Foundation.  Oracle designates this
4692# particular file as subject to the "Classpath" exception as provided
4693# by Oracle in the LICENSE file that accompanied this code.
4694#
4695# This code is distributed in the hope that it will be useful, but WITHOUT
4696# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4697# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4698# version 2 for more details (a copy is included in the LICENSE file that
4699# accompanied this code).
4700#
4701# You should have received a copy of the GNU General Public License version
4702# 2 along with this work; if not, write to the Free Software Foundation,
4703# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4704#
4705# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4706# or visit www.oracle.com if you need additional information or have any
4707# questions.
4708#
4709
4710################################################################################
4711# Build the freetype lib from source
4712################################################################################
4713
4714
4715################################################################################
4716# Check if a potential freeype library match is correct and usable
4717################################################################################
4718
4719
4720################################################################################
4721# Setup freetype (The FreeType2 font rendering library)
4722################################################################################
4723
4724
4725#
4726# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4727# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4728#
4729# This code is free software; you can redistribute it and/or modify it
4730# under the terms of the GNU General Public License version 2 only, as
4731# published by the Free Software Foundation.  Oracle designates this
4732# particular file as subject to the "Classpath" exception as provided
4733# by Oracle in the LICENSE file that accompanied this code.
4734#
4735# This code is distributed in the hope that it will be useful, but WITHOUT
4736# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4737# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4738# version 2 for more details (a copy is included in the LICENSE file that
4739# accompanied this code).
4740#
4741# You should have received a copy of the GNU General Public License version
4742# 2 along with this work; if not, write to the Free Software Foundation,
4743# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4744#
4745# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4746# or visit www.oracle.com if you need additional information or have any
4747# questions.
4748#
4749
4750################################################################################
4751# Setup the standard C/C++ runtime libraries.
4752#
4753# Most importantly, determine if stdc++ should be linked statically or
4754# dynamically.
4755################################################################################
4756
4757
4758#
4759# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4760# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4761#
4762# This code is free software; you can redistribute it and/or modify it
4763# under the terms of the GNU General Public License version 2 only, as
4764# published by the Free Software Foundation.  Oracle designates this
4765# particular file as subject to the "Classpath" exception as provided
4766# by Oracle in the LICENSE file that accompanied this code.
4767#
4768# This code is distributed in the hope that it will be useful, but WITHOUT
4769# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4770# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4771# version 2 for more details (a copy is included in the LICENSE file that
4772# accompanied this code).
4773#
4774# You should have received a copy of the GNU General Public License version
4775# 2 along with this work; if not, write to the Free Software Foundation,
4776# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4777#
4778# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4779# or visit www.oracle.com if you need additional information or have any
4780# questions.
4781#
4782
4783################################################################################
4784# Setup X11 Windows system
4785################################################################################
4786
4787
4788#
4789# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4790# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4791#
4792# This code is free software; you can redistribute it and/or modify it
4793# under the terms of the GNU General Public License version 2 only, as
4794# published by the Free Software Foundation.  Oracle designates this
4795# particular file as subject to the "Classpath" exception as provided
4796# by Oracle in the LICENSE file that accompanied this code.
4797#
4798# This code is distributed in the hope that it will be useful, but WITHOUT
4799# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4800# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4801# version 2 for more details (a copy is included in the LICENSE file that
4802# accompanied this code).
4803#
4804# You should have received a copy of the GNU General Public License version
4805# 2 along with this work; if not, write to the Free Software Foundation,
4806# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4807#
4808# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4809# or visit www.oracle.com if you need additional information or have any
4810# questions.
4811#
4812
4813################################################################################
4814# Setup libelf (ELF library)
4815################################################################################
4816
4817
4818
4819################################################################################
4820# Determine which libraries are needed for this configuration
4821################################################################################
4822
4823
4824################################################################################
4825# Parse library options, and setup needed libraries
4826################################################################################
4827
4828
4829################################################################################
4830# Setup llvm (Low-Level VM)
4831################################################################################
4832
4833
4834################################################################################
4835# Setup various libraries, typically small system libraries
4836################################################################################
4837
4838
4839################################################################################
4840# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4841# redistribute it in the test image.
4842################################################################################
4843
4844
4845
4846#
4847# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4848# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4849#
4850# This code is free software; you can redistribute it and/or modify it
4851# under the terms of the GNU General Public License version 2 only, as
4852# published by the Free Software Foundation.  Oracle designates this
4853# particular file as subject to the "Classpath" exception as provided
4854# by Oracle in the LICENSE file that accompanied this code.
4855#
4856# This code is distributed in the hope that it will be useful, but WITHOUT
4857# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4858# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4859# version 2 for more details (a copy is included in the LICENSE file that
4860# accompanied this code).
4861#
4862# You should have received a copy of the GNU General Public License version
4863# 2 along with this work; if not, write to the Free Software Foundation,
4864# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4865#
4866# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4867# or visit www.oracle.com if you need additional information or have any
4868# questions.
4869#
4870
4871# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4872# Converts autoconf style CPU name to OpenJDK style, into
4873# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4874
4875
4876# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4877# Converts autoconf style OS name to OpenJDK style, into
4878# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4879
4880
4881# Expects $host_os $host_cpu $build_os and $build_cpu
4882# and $with_target_bits to have been setup!
4883#
4884# Translate the standard triplet(quadruplet) definition
4885# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4886# OPENJDK_BUILD_OS, etc.
4887
4888
4889# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4890# accordingly. Must be done after setting up build and target system, but before
4891# doing anything else with these values.
4892
4893
4894# Setup the legacy variables, for controlling the old makefiles.
4895#
4896
4897
4898# $1 - Either TARGET or BUILD to setup the variables for.
4899
4900
4901
4902
4903#%%% Build and target systems %%%
4904
4905
4906
4907
4908# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4909# Add -mX to various FLAGS variables.
4910
4911
4912
4913
4914
4915
4916#
4917# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4918# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4919#
4920# This code is free software; you can redistribute it and/or modify it
4921# under the terms of the GNU General Public License version 2 only, as
4922# published by the Free Software Foundation.  Oracle designates this
4923# particular file as subject to the "Classpath" exception as provided
4924# by Oracle in the LICENSE file that accompanied this code.
4925#
4926# This code is distributed in the hope that it will be useful, but WITHOUT
4927# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4928# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4929# version 2 for more details (a copy is included in the LICENSE file that
4930# accompanied this code).
4931#
4932# You should have received a copy of the GNU General Public License version
4933# 2 along with this work; if not, write to the Free Software Foundation,
4934# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4935#
4936# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4937# or visit www.oracle.com if you need additional information or have any
4938# questions.
4939#
4940
4941
4942
4943
4944
4945
4946
4947################################################################################
4948# Define a mechanism for importing extra prebuilt modules
4949#
4950
4951
4952
4953#
4954# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4956#
4957# This code is free software; you can redistribute it and/or modify it
4958# under the terms of the GNU General Public License version 2 only, as
4959# published by the Free Software Foundation.  Oracle designates this
4960# particular file as subject to the "Classpath" exception as provided
4961# by Oracle in the LICENSE file that accompanied this code.
4962#
4963# This code is distributed in the hope that it will be useful, but WITHOUT
4964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4966# version 2 for more details (a copy is included in the LICENSE file that
4967# accompanied this code).
4968#
4969# You should have received a copy of the GNU General Public License version
4970# 2 along with this work; if not, write to the Free Software Foundation,
4971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4972#
4973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4974# or visit www.oracle.com if you need additional information or have any
4975# questions.
4976#
4977
4978########################################################################
4979# This file is responsible for detecting, verifying and setting up the
4980# toolchain, i.e. the compiler, linker and related utilities. It will setup
4981# proper paths to the binaries, but it will not setup any flags.
4982#
4983# The binaries used is determined by the toolchain type, which is the family of
4984# compilers and related tools that are used.
4985########################################################################
4986
4987
4988# All valid toolchains, regardless of platform (used by help.m4)
4989VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4990
4991# These toolchains are valid on different platforms
4992VALID_TOOLCHAINS_linux="gcc clang"
4993VALID_TOOLCHAINS_solaris="solstudio"
4994VALID_TOOLCHAINS_macosx="gcc clang"
4995VALID_TOOLCHAINS_aix="xlc"
4996VALID_TOOLCHAINS_windows="microsoft"
4997
4998# Toolchain descriptions
4999TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
5000TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
5001TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
5002TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5003TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5004
5005# Minimum supported versions, empty means unspecified
5006TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5007TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5008TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5009TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5010TOOLCHAIN_MINIMUM_VERSION_xlc=""
5011
5012# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5013# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5014# $1 - optional variable prefix for compiler and version variables (BUILD_)
5015# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5016
5017
5018# Check if the configured compiler (C and C++) is of a specific version or
5019# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5020#
5021# Arguments:
5022#   VERSION:   The version string to check against the found version
5023#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5024#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5025#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5026
5027
5028
5029
5030# Setup a number of variables describing how native output files are
5031# named on this platform/toolchain.
5032
5033
5034# Determine which toolchain type to use, and make sure it is valid for this
5035# platform. Setup various information about the selected toolchain.
5036
5037
5038# Before we start detecting the toolchain executables, we might need some
5039# special setup, e.g. additional paths etc.
5040
5041
5042# Restore path, etc
5043
5044
5045# Check if a compiler is of the toolchain type we expect, and save the version
5046# information from it. If the compiler does not match the expected type,
5047# this function will abort using AC_MSG_ERROR. If it matches, the version will
5048# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5049# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5050#
5051# $1 = compiler to test (CC or CXX)
5052# $2 = human readable name of compiler (C or C++)
5053
5054
5055# Try to locate the given C or C++ compiler in the path, or otherwise.
5056#
5057# $1 = compiler to test (CC or CXX)
5058# $2 = human readable name of compiler (C or C++)
5059# $3 = compiler name to search for
5060
5061
5062# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5063# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5064# archiver (AR). Verify that the compilers are correct according to the
5065# toolchain type.
5066
5067
5068# Setup additional tools that is considered a part of the toolchain, but not the
5069# core part. Many of these are highly platform-specific and do not exist,
5070# and/or are not needed on all platforms.
5071
5072
5073# Setup the build tools (i.e, the compiler and linker used to build programs
5074# that should be run on the build platform, not the target platform, as a build
5075# helper). Since the non-cross-compile case uses the normal, target compilers
5076# for this, we can only do this after these have been setup.
5077
5078
5079# Do some additional checks on the detected tools.
5080
5081
5082# Setup the JTReg Regression Test Harness.
5083
5084
5085#
5086# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5088#
5089# This code is free software; you can redistribute it and/or modify it
5090# under the terms of the GNU General Public License version 2 only, as
5091# published by the Free Software Foundation.  Oracle designates this
5092# particular file as subject to the "Classpath" exception as provided
5093# by Oracle in the LICENSE file that accompanied this code.
5094#
5095# This code is distributed in the hope that it will be useful, but WITHOUT
5096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5098# version 2 for more details (a copy is included in the LICENSE file that
5099# accompanied this code).
5100#
5101# You should have received a copy of the GNU General Public License version
5102# 2 along with this work; if not, write to the Free Software Foundation,
5103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5104#
5105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5106# or visit www.oracle.com if you need additional information or have any
5107# questions.
5108#
5109
5110################################################################################
5111# The order of these defines the priority by which we try to find them.
5112VALID_VS_VERSIONS="2013 2012 2010"
5113
5114VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5115VS_VERSION_INTERNAL_2010=100
5116VS_MSVCR_2010=msvcr100.dll
5117# We don't use msvcp on Visual Studio 2010
5118#VS_MSVCP_2010=msvcp100.dll
5119VS_ENVVAR_2010="VS100COMNTOOLS"
5120VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5121VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5122VS_VS_PLATFORM_NAME_2010="v100"
5123VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5124
5125VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5126VS_VERSION_INTERNAL_2012=110
5127VS_MSVCR_2012=msvcr110.dll
5128VS_MSVCP_2012=msvcp110.dll
5129VS_ENVVAR_2012="VS110COMNTOOLS"
5130VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5131VS_SDK_INSTALLDIR_2012=
5132VS_VS_PLATFORM_NAME_2012="v110"
5133VS_SDK_PLATFORM_NAME_2012=
5134
5135VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5136VS_VERSION_INTERNAL_2013=120
5137VS_MSVCR_2013=msvcr120.dll
5138VS_MSVCP_2013=msvcp120.dll
5139VS_ENVVAR_2013="VS120COMNTOOLS"
5140VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5141VS_SDK_INSTALLDIR_2013=
5142VS_VS_PLATFORM_NAME_2013="v120"
5143VS_SDK_PLATFORM_NAME_2013=
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150
5151
5152
5153################################################################################
5154# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5155# build environment and assigns it to VS_ENV_CMD
5156
5157
5158################################################################################
5159
5160
5161
5162################################################################################
5163# Check if the VS env variables were setup prior to running configure.
5164# If not, then find vcvarsall.bat and run it automatically, and integrate
5165# the set env variables into the spec file.
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180# This line needs to be here, verbatim, after all includes and the dummy hook
5181# definitions. It is replaced with custom functionality when building
5182# custom sources.
5183#CUSTOM_AUTOCONF_INCLUDE
5184
5185# Do not change or remove the following line, it is needed for consistency checks:
5186DATE_WHEN_GENERATED=1492975963
5187
5188###############################################################################
5189#
5190# Initialization / Boot-strapping
5191#
5192# The bootstrapping process needs to solve the "chicken or the egg" problem,
5193# thus it jumps back and forth, each time gaining something needed later on.
5194#
5195###############################################################################
5196
5197# If we are requested to print additional help, do that and then exit.
5198# This must be the very first call.
5199
5200  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5201
5202    # Print available toolchains
5203    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5204    $PRINTF "Which are valid to use depends on the build platform.\n"
5205    for toolchain in $VALID_TOOLCHAINS_all; do
5206      # Use indirect variable referencing
5207      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5208      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5209      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5210    done
5211    $PRINTF "\n"
5212
5213    # Print available jvm features
5214    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5215    $PRINTF "Which are valid to use depends on the target platform.\n  "
5216    $PRINTF "%s " $VALID_JVM_FEATURES
5217    $PRINTF "\n"
5218
5219    # And now exit directly
5220    exit 0
5221  fi
5222
5223
5224# Basic initialization that must happen first of all in the normal process.
5225
5226  # Save the original command line. This is passed to us by the wrapper configure script.
5227
5228  # Save the path variable before it gets changed
5229  ORIGINAL_PATH="$PATH"
5230
5231  DATE_WHEN_CONFIGURED=`LANG=C date`
5232
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5234$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5236$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5237
5238
5239  # Start with tools that do not need have cross compilation support
5240  # and can be expected to be found in the default PATH. These tools are
5241  # used by configure.
5242
5243  # First are all the simple required tools.
5244
5245
5246
5247  # Publish this variable in the help.
5248
5249
5250  if [ -z "${BASENAME+x}" ]; then
5251    # The variable is not set by user, try to locate tool using the code snippet
5252    for ac_prog in basename
5253do
5254  # Extract the first word of "$ac_prog", so it can be a program name with args.
5255set dummy $ac_prog; ac_word=$2
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5257$as_echo_n "checking for $ac_word... " >&6; }
5258if ${ac_cv_path_BASENAME+:} false; then :
5259  $as_echo_n "(cached) " >&6
5260else
5261  case $BASENAME in
5262  [\\/]* | ?:[\\/]*)
5263  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5264  ;;
5265  *)
5266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269  IFS=$as_save_IFS
5270  test -z "$as_dir" && as_dir=.
5271    for ac_exec_ext in '' $ac_executable_extensions; do
5272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5273    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275    break 2
5276  fi
5277done
5278  done
5279IFS=$as_save_IFS
5280
5281  ;;
5282esac
5283fi
5284BASENAME=$ac_cv_path_BASENAME
5285if test -n "$BASENAME"; then
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5287$as_echo "$BASENAME" >&6; }
5288else
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290$as_echo "no" >&6; }
5291fi
5292
5293
5294  test -n "$BASENAME" && break
5295done
5296
5297  else
5298    # The variable is set, but is it from the command line or the environment?
5299
5300    # Try to remove the string !BASENAME! from our list.
5301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5303      # If it failed, the variable was not from the command line. Ignore it,
5304      # but warn the user (except for BASH, which is always set by the calling BASH).
5305      if test "xBASENAME" != xBASH; then
5306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5307$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5308      fi
5309      # Try to locate tool using the code snippet
5310      for ac_prog in basename
5311do
5312  # Extract the first word of "$ac_prog", so it can be a program name with args.
5313set dummy $ac_prog; ac_word=$2
5314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5315$as_echo_n "checking for $ac_word... " >&6; }
5316if ${ac_cv_path_BASENAME+:} false; then :
5317  $as_echo_n "(cached) " >&6
5318else
5319  case $BASENAME in
5320  [\\/]* | ?:[\\/]*)
5321  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5322  ;;
5323  *)
5324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5325for as_dir in $PATH
5326do
5327  IFS=$as_save_IFS
5328  test -z "$as_dir" && as_dir=.
5329    for ac_exec_ext in '' $ac_executable_extensions; do
5330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5331    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5333    break 2
5334  fi
5335done
5336  done
5337IFS=$as_save_IFS
5338
5339  ;;
5340esac
5341fi
5342BASENAME=$ac_cv_path_BASENAME
5343if test -n "$BASENAME"; then
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5345$as_echo "$BASENAME" >&6; }
5346else
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5348$as_echo "no" >&6; }
5349fi
5350
5351
5352  test -n "$BASENAME" && break
5353done
5354
5355    else
5356      # If it succeeded, then it was overridden by the user. We will use it
5357      # for the tool.
5358
5359      # First remove it from the list of overridden variables, so we can test
5360      # for unknown variables in the end.
5361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5362
5363      # Check if we try to supply an empty value
5364      if test "x$BASENAME" = x; then
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5366$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5368$as_echo_n "checking for BASENAME... " >&6; }
5369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5370$as_echo "disabled" >&6; }
5371      else
5372        # Check if the provided tool contains a complete path.
5373        tool_specified="$BASENAME"
5374        tool_basename="${tool_specified##*/}"
5375        if test "x$tool_basename" = "x$tool_specified"; then
5376          # A command without a complete path is provided, search $PATH.
5377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5378$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5379          # Extract the first word of "$tool_basename", so it can be a program name with args.
5380set dummy $tool_basename; ac_word=$2
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5382$as_echo_n "checking for $ac_word... " >&6; }
5383if ${ac_cv_path_BASENAME+:} false; then :
5384  $as_echo_n "(cached) " >&6
5385else
5386  case $BASENAME in
5387  [\\/]* | ?:[\\/]*)
5388  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5389  ;;
5390  *)
5391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5392for as_dir in $PATH
5393do
5394  IFS=$as_save_IFS
5395  test -z "$as_dir" && as_dir=.
5396    for ac_exec_ext in '' $ac_executable_extensions; do
5397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5398    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5400    break 2
5401  fi
5402done
5403  done
5404IFS=$as_save_IFS
5405
5406  ;;
5407esac
5408fi
5409BASENAME=$ac_cv_path_BASENAME
5410if test -n "$BASENAME"; then
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5412$as_echo "$BASENAME" >&6; }
5413else
5414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5416fi
5417
5418
5419          if test "x$BASENAME" = x; then
5420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5421          fi
5422        else
5423          # Otherwise we believe it is a complete path. Use it as it is.
5424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5425$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5427$as_echo_n "checking for BASENAME... " >&6; }
5428          if test ! -x "$tool_specified"; then
5429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5430$as_echo "not found" >&6; }
5431            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5432          fi
5433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5434$as_echo "$tool_specified" >&6; }
5435        fi
5436      fi
5437    fi
5438
5439  fi
5440
5441
5442
5443  if test "x$BASENAME" = x; then
5444    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5445  fi
5446
5447
5448
5449
5450
5451  # Publish this variable in the help.
5452
5453
5454  if [ -z "${BASH+x}" ]; then
5455    # The variable is not set by user, try to locate tool using the code snippet
5456    for ac_prog in bash
5457do
5458  # Extract the first word of "$ac_prog", so it can be a program name with args.
5459set dummy $ac_prog; ac_word=$2
5460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5461$as_echo_n "checking for $ac_word... " >&6; }
5462if ${ac_cv_path_BASH+:} false; then :
5463  $as_echo_n "(cached) " >&6
5464else
5465  case $BASH in
5466  [\\/]* | ?:[\\/]*)
5467  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5468  ;;
5469  *)
5470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5471for as_dir in $PATH
5472do
5473  IFS=$as_save_IFS
5474  test -z "$as_dir" && as_dir=.
5475    for ac_exec_ext in '' $ac_executable_extensions; do
5476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5477    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5479    break 2
5480  fi
5481done
5482  done
5483IFS=$as_save_IFS
5484
5485  ;;
5486esac
5487fi
5488BASH=$ac_cv_path_BASH
5489if test -n "$BASH"; then
5490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5491$as_echo "$BASH" >&6; }
5492else
5493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5494$as_echo "no" >&6; }
5495fi
5496
5497
5498  test -n "$BASH" && break
5499done
5500
5501  else
5502    # The variable is set, but is it from the command line or the environment?
5503
5504    # Try to remove the string !BASH! from our list.
5505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5507      # If it failed, the variable was not from the command line. Ignore it,
5508      # but warn the user (except for BASH, which is always set by the calling BASH).
5509      if test "xBASH" != xBASH; then
5510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5511$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5512      fi
5513      # Try to locate tool using the code snippet
5514      for ac_prog in bash
5515do
5516  # Extract the first word of "$ac_prog", so it can be a program name with args.
5517set dummy $ac_prog; ac_word=$2
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5519$as_echo_n "checking for $ac_word... " >&6; }
5520if ${ac_cv_path_BASH+:} false; then :
5521  $as_echo_n "(cached) " >&6
5522else
5523  case $BASH in
5524  [\\/]* | ?:[\\/]*)
5525  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5526  ;;
5527  *)
5528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5529for as_dir in $PATH
5530do
5531  IFS=$as_save_IFS
5532  test -z "$as_dir" && as_dir=.
5533    for ac_exec_ext in '' $ac_executable_extensions; do
5534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5535    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5537    break 2
5538  fi
5539done
5540  done
5541IFS=$as_save_IFS
5542
5543  ;;
5544esac
5545fi
5546BASH=$ac_cv_path_BASH
5547if test -n "$BASH"; then
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5549$as_echo "$BASH" >&6; }
5550else
5551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5552$as_echo "no" >&6; }
5553fi
5554
5555
5556  test -n "$BASH" && break
5557done
5558
5559    else
5560      # If it succeeded, then it was overridden by the user. We will use it
5561      # for the tool.
5562
5563      # First remove it from the list of overridden variables, so we can test
5564      # for unknown variables in the end.
5565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5566
5567      # Check if we try to supply an empty value
5568      if test "x$BASH" = x; then
5569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5570$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5572$as_echo_n "checking for BASH... " >&6; }
5573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5574$as_echo "disabled" >&6; }
5575      else
5576        # Check if the provided tool contains a complete path.
5577        tool_specified="$BASH"
5578        tool_basename="${tool_specified##*/}"
5579        if test "x$tool_basename" = "x$tool_specified"; then
5580          # A command without a complete path is provided, search $PATH.
5581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5582$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5583          # Extract the first word of "$tool_basename", so it can be a program name with args.
5584set dummy $tool_basename; ac_word=$2
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586$as_echo_n "checking for $ac_word... " >&6; }
5587if ${ac_cv_path_BASH+:} false; then :
5588  $as_echo_n "(cached) " >&6
5589else
5590  case $BASH in
5591  [\\/]* | ?:[\\/]*)
5592  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5593  ;;
5594  *)
5595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598  IFS=$as_save_IFS
5599  test -z "$as_dir" && as_dir=.
5600    for ac_exec_ext in '' $ac_executable_extensions; do
5601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604    break 2
5605  fi
5606done
5607  done
5608IFS=$as_save_IFS
5609
5610  ;;
5611esac
5612fi
5613BASH=$ac_cv_path_BASH
5614if test -n "$BASH"; then
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5616$as_echo "$BASH" >&6; }
5617else
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623          if test "x$BASH" = x; then
5624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5625          fi
5626        else
5627          # Otherwise we believe it is a complete path. Use it as it is.
5628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5629$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5631$as_echo_n "checking for BASH... " >&6; }
5632          if test ! -x "$tool_specified"; then
5633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5634$as_echo "not found" >&6; }
5635            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5636          fi
5637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5638$as_echo "$tool_specified" >&6; }
5639        fi
5640      fi
5641    fi
5642
5643  fi
5644
5645
5646
5647  if test "x$BASH" = x; then
5648    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5649  fi
5650
5651
5652
5653
5654
5655  # Publish this variable in the help.
5656
5657
5658  if [ -z "${CAT+x}" ]; then
5659    # The variable is not set by user, try to locate tool using the code snippet
5660    for ac_prog in cat
5661do
5662  # Extract the first word of "$ac_prog", so it can be a program name with args.
5663set dummy $ac_prog; ac_word=$2
5664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5665$as_echo_n "checking for $ac_word... " >&6; }
5666if ${ac_cv_path_CAT+:} false; then :
5667  $as_echo_n "(cached) " >&6
5668else
5669  case $CAT in
5670  [\\/]* | ?:[\\/]*)
5671  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5672  ;;
5673  *)
5674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677  IFS=$as_save_IFS
5678  test -z "$as_dir" && as_dir=.
5679    for ac_exec_ext in '' $ac_executable_extensions; do
5680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5681    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5683    break 2
5684  fi
5685done
5686  done
5687IFS=$as_save_IFS
5688
5689  ;;
5690esac
5691fi
5692CAT=$ac_cv_path_CAT
5693if test -n "$CAT"; then
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5695$as_echo "$CAT" >&6; }
5696else
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
5699fi
5700
5701
5702  test -n "$CAT" && break
5703done
5704
5705  else
5706    # The variable is set, but is it from the command line or the environment?
5707
5708    # Try to remove the string !CAT! from our list.
5709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5711      # If it failed, the variable was not from the command line. Ignore it,
5712      # but warn the user (except for BASH, which is always set by the calling BASH).
5713      if test "xCAT" != xBASH; then
5714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5715$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5716      fi
5717      # Try to locate tool using the code snippet
5718      for ac_prog in cat
5719do
5720  # Extract the first word of "$ac_prog", so it can be a program name with args.
5721set dummy $ac_prog; ac_word=$2
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5723$as_echo_n "checking for $ac_word... " >&6; }
5724if ${ac_cv_path_CAT+:} false; then :
5725  $as_echo_n "(cached) " >&6
5726else
5727  case $CAT in
5728  [\\/]* | ?:[\\/]*)
5729  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5730  ;;
5731  *)
5732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733for as_dir in $PATH
5734do
5735  IFS=$as_save_IFS
5736  test -z "$as_dir" && as_dir=.
5737    for ac_exec_ext in '' $ac_executable_extensions; do
5738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5739    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741    break 2
5742  fi
5743done
5744  done
5745IFS=$as_save_IFS
5746
5747  ;;
5748esac
5749fi
5750CAT=$ac_cv_path_CAT
5751if test -n "$CAT"; then
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5753$as_echo "$CAT" >&6; }
5754else
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756$as_echo "no" >&6; }
5757fi
5758
5759
5760  test -n "$CAT" && break
5761done
5762
5763    else
5764      # If it succeeded, then it was overridden by the user. We will use it
5765      # for the tool.
5766
5767      # First remove it from the list of overridden variables, so we can test
5768      # for unknown variables in the end.
5769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5770
5771      # Check if we try to supply an empty value
5772      if test "x$CAT" = x; then
5773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5774$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5776$as_echo_n "checking for CAT... " >&6; }
5777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5778$as_echo "disabled" >&6; }
5779      else
5780        # Check if the provided tool contains a complete path.
5781        tool_specified="$CAT"
5782        tool_basename="${tool_specified##*/}"
5783        if test "x$tool_basename" = "x$tool_specified"; then
5784          # A command without a complete path is provided, search $PATH.
5785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5786$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5787          # Extract the first word of "$tool_basename", so it can be a program name with args.
5788set dummy $tool_basename; ac_word=$2
5789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790$as_echo_n "checking for $ac_word... " >&6; }
5791if ${ac_cv_path_CAT+:} false; then :
5792  $as_echo_n "(cached) " >&6
5793else
5794  case $CAT in
5795  [\\/]* | ?:[\\/]*)
5796  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5797  ;;
5798  *)
5799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5800for as_dir in $PATH
5801do
5802  IFS=$as_save_IFS
5803  test -z "$as_dir" && as_dir=.
5804    for ac_exec_ext in '' $ac_executable_extensions; do
5805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5806    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5808    break 2
5809  fi
5810done
5811  done
5812IFS=$as_save_IFS
5813
5814  ;;
5815esac
5816fi
5817CAT=$ac_cv_path_CAT
5818if test -n "$CAT"; then
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5820$as_echo "$CAT" >&6; }
5821else
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
5824fi
5825
5826
5827          if test "x$CAT" = x; then
5828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5829          fi
5830        else
5831          # Otherwise we believe it is a complete path. Use it as it is.
5832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5833$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5835$as_echo_n "checking for CAT... " >&6; }
5836          if test ! -x "$tool_specified"; then
5837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5838$as_echo "not found" >&6; }
5839            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5840          fi
5841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5842$as_echo "$tool_specified" >&6; }
5843        fi
5844      fi
5845    fi
5846
5847  fi
5848
5849
5850
5851  if test "x$CAT" = x; then
5852    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5853  fi
5854
5855
5856
5857
5858
5859  # Publish this variable in the help.
5860
5861
5862  if [ -z "${CHMOD+x}" ]; then
5863    # The variable is not set by user, try to locate tool using the code snippet
5864    for ac_prog in chmod
5865do
5866  # Extract the first word of "$ac_prog", so it can be a program name with args.
5867set dummy $ac_prog; ac_word=$2
5868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5869$as_echo_n "checking for $ac_word... " >&6; }
5870if ${ac_cv_path_CHMOD+:} false; then :
5871  $as_echo_n "(cached) " >&6
5872else
5873  case $CHMOD in
5874  [\\/]* | ?:[\\/]*)
5875  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5876  ;;
5877  *)
5878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5879for as_dir in $PATH
5880do
5881  IFS=$as_save_IFS
5882  test -z "$as_dir" && as_dir=.
5883    for ac_exec_ext in '' $ac_executable_extensions; do
5884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5885    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5887    break 2
5888  fi
5889done
5890  done
5891IFS=$as_save_IFS
5892
5893  ;;
5894esac
5895fi
5896CHMOD=$ac_cv_path_CHMOD
5897if test -n "$CHMOD"; then
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5899$as_echo "$CHMOD" >&6; }
5900else
5901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902$as_echo "no" >&6; }
5903fi
5904
5905
5906  test -n "$CHMOD" && break
5907done
5908
5909  else
5910    # The variable is set, but is it from the command line or the environment?
5911
5912    # Try to remove the string !CHMOD! from our list.
5913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5915      # If it failed, the variable was not from the command line. Ignore it,
5916      # but warn the user (except for BASH, which is always set by the calling BASH).
5917      if test "xCHMOD" != xBASH; then
5918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5919$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5920      fi
5921      # Try to locate tool using the code snippet
5922      for ac_prog in chmod
5923do
5924  # Extract the first word of "$ac_prog", so it can be a program name with args.
5925set dummy $ac_prog; ac_word=$2
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
5928if ${ac_cv_path_CHMOD+:} false; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931  case $CHMOD in
5932  [\\/]* | ?:[\\/]*)
5933  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5934  ;;
5935  *)
5936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939  IFS=$as_save_IFS
5940  test -z "$as_dir" && as_dir=.
5941    for ac_exec_ext in '' $ac_executable_extensions; do
5942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945    break 2
5946  fi
5947done
5948  done
5949IFS=$as_save_IFS
5950
5951  ;;
5952esac
5953fi
5954CHMOD=$ac_cv_path_CHMOD
5955if test -n "$CHMOD"; then
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5957$as_echo "$CHMOD" >&6; }
5958else
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
5961fi
5962
5963
5964  test -n "$CHMOD" && break
5965done
5966
5967    else
5968      # If it succeeded, then it was overridden by the user. We will use it
5969      # for the tool.
5970
5971      # First remove it from the list of overridden variables, so we can test
5972      # for unknown variables in the end.
5973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5974
5975      # Check if we try to supply an empty value
5976      if test "x$CHMOD" = x; then
5977        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5978$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5980$as_echo_n "checking for CHMOD... " >&6; }
5981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5982$as_echo "disabled" >&6; }
5983      else
5984        # Check if the provided tool contains a complete path.
5985        tool_specified="$CHMOD"
5986        tool_basename="${tool_specified##*/}"
5987        if test "x$tool_basename" = "x$tool_specified"; then
5988          # A command without a complete path is provided, search $PATH.
5989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5990$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5991          # Extract the first word of "$tool_basename", so it can be a program name with args.
5992set dummy $tool_basename; ac_word=$2
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994$as_echo_n "checking for $ac_word... " >&6; }
5995if ${ac_cv_path_CHMOD+:} false; then :
5996  $as_echo_n "(cached) " >&6
5997else
5998  case $CHMOD in
5999  [\\/]* | ?:[\\/]*)
6000  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
6001  ;;
6002  *)
6003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006  IFS=$as_save_IFS
6007  test -z "$as_dir" && as_dir=.
6008    for ac_exec_ext in '' $ac_executable_extensions; do
6009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6010    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012    break 2
6013  fi
6014done
6015  done
6016IFS=$as_save_IFS
6017
6018  ;;
6019esac
6020fi
6021CHMOD=$ac_cv_path_CHMOD
6022if test -n "$CHMOD"; then
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6024$as_echo "$CHMOD" >&6; }
6025else
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028fi
6029
6030
6031          if test "x$CHMOD" = x; then
6032            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6033          fi
6034        else
6035          # Otherwise we believe it is a complete path. Use it as it is.
6036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6037$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6038          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6039$as_echo_n "checking for CHMOD... " >&6; }
6040          if test ! -x "$tool_specified"; then
6041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6042$as_echo "not found" >&6; }
6043            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6044          fi
6045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6046$as_echo "$tool_specified" >&6; }
6047        fi
6048      fi
6049    fi
6050
6051  fi
6052
6053
6054
6055  if test "x$CHMOD" = x; then
6056    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6057  fi
6058
6059
6060
6061
6062
6063  # Publish this variable in the help.
6064
6065
6066  if [ -z "${CMP+x}" ]; then
6067    # The variable is not set by user, try to locate tool using the code snippet
6068    for ac_prog in cmp
6069do
6070  # Extract the first word of "$ac_prog", so it can be a program name with args.
6071set dummy $ac_prog; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_path_CMP+:} false; then :
6075  $as_echo_n "(cached) " >&6
6076else
6077  case $CMP in
6078  [\\/]* | ?:[\\/]*)
6079  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6080  ;;
6081  *)
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_exec_ext in '' $ac_executable_extensions; do
6088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6089    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6091    break 2
6092  fi
6093done
6094  done
6095IFS=$as_save_IFS
6096
6097  ;;
6098esac
6099fi
6100CMP=$ac_cv_path_CMP
6101if test -n "$CMP"; then
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6103$as_echo "$CMP" >&6; }
6104else
6105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6106$as_echo "no" >&6; }
6107fi
6108
6109
6110  test -n "$CMP" && break
6111done
6112
6113  else
6114    # The variable is set, but is it from the command line or the environment?
6115
6116    # Try to remove the string !CMP! from our list.
6117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6119      # If it failed, the variable was not from the command line. Ignore it,
6120      # but warn the user (except for BASH, which is always set by the calling BASH).
6121      if test "xCMP" != xBASH; then
6122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6123$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6124      fi
6125      # Try to locate tool using the code snippet
6126      for ac_prog in cmp
6127do
6128  # Extract the first word of "$ac_prog", so it can be a program name with args.
6129set dummy $ac_prog; ac_word=$2
6130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6131$as_echo_n "checking for $ac_word... " >&6; }
6132if ${ac_cv_path_CMP+:} false; then :
6133  $as_echo_n "(cached) " >&6
6134else
6135  case $CMP in
6136  [\\/]* | ?:[\\/]*)
6137  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6138  ;;
6139  *)
6140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143  IFS=$as_save_IFS
6144  test -z "$as_dir" && as_dir=.
6145    for ac_exec_ext in '' $ac_executable_extensions; do
6146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6147    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149    break 2
6150  fi
6151done
6152  done
6153IFS=$as_save_IFS
6154
6155  ;;
6156esac
6157fi
6158CMP=$ac_cv_path_CMP
6159if test -n "$CMP"; then
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6161$as_echo "$CMP" >&6; }
6162else
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164$as_echo "no" >&6; }
6165fi
6166
6167
6168  test -n "$CMP" && break
6169done
6170
6171    else
6172      # If it succeeded, then it was overridden by the user. We will use it
6173      # for the tool.
6174
6175      # First remove it from the list of overridden variables, so we can test
6176      # for unknown variables in the end.
6177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6178
6179      # Check if we try to supply an empty value
6180      if test "x$CMP" = x; then
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6182$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6184$as_echo_n "checking for CMP... " >&6; }
6185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6186$as_echo "disabled" >&6; }
6187      else
6188        # Check if the provided tool contains a complete path.
6189        tool_specified="$CMP"
6190        tool_basename="${tool_specified##*/}"
6191        if test "x$tool_basename" = "x$tool_specified"; then
6192          # A command without a complete path is provided, search $PATH.
6193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6194$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6195          # Extract the first word of "$tool_basename", so it can be a program name with args.
6196set dummy $tool_basename; ac_word=$2
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198$as_echo_n "checking for $ac_word... " >&6; }
6199if ${ac_cv_path_CMP+:} false; then :
6200  $as_echo_n "(cached) " >&6
6201else
6202  case $CMP in
6203  [\\/]* | ?:[\\/]*)
6204  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6205  ;;
6206  *)
6207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6208for as_dir in $PATH
6209do
6210  IFS=$as_save_IFS
6211  test -z "$as_dir" && as_dir=.
6212    for ac_exec_ext in '' $ac_executable_extensions; do
6213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6214    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6216    break 2
6217  fi
6218done
6219  done
6220IFS=$as_save_IFS
6221
6222  ;;
6223esac
6224fi
6225CMP=$ac_cv_path_CMP
6226if test -n "$CMP"; then
6227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6228$as_echo "$CMP" >&6; }
6229else
6230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6231$as_echo "no" >&6; }
6232fi
6233
6234
6235          if test "x$CMP" = x; then
6236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6237          fi
6238        else
6239          # Otherwise we believe it is a complete path. Use it as it is.
6240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6241$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6243$as_echo_n "checking for CMP... " >&6; }
6244          if test ! -x "$tool_specified"; then
6245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6246$as_echo "not found" >&6; }
6247            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6248          fi
6249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6250$as_echo "$tool_specified" >&6; }
6251        fi
6252      fi
6253    fi
6254
6255  fi
6256
6257
6258
6259  if test "x$CMP" = x; then
6260    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6261  fi
6262
6263
6264
6265
6266
6267  # Publish this variable in the help.
6268
6269
6270  if [ -z "${COMM+x}" ]; then
6271    # The variable is not set by user, try to locate tool using the code snippet
6272    for ac_prog in comm
6273do
6274  # Extract the first word of "$ac_prog", so it can be a program name with args.
6275set dummy $ac_prog; ac_word=$2
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6277$as_echo_n "checking for $ac_word... " >&6; }
6278if ${ac_cv_path_COMM+:} false; then :
6279  $as_echo_n "(cached) " >&6
6280else
6281  case $COMM in
6282  [\\/]* | ?:[\\/]*)
6283  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6284  ;;
6285  *)
6286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289  IFS=$as_save_IFS
6290  test -z "$as_dir" && as_dir=.
6291    for ac_exec_ext in '' $ac_executable_extensions; do
6292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295    break 2
6296  fi
6297done
6298  done
6299IFS=$as_save_IFS
6300
6301  ;;
6302esac
6303fi
6304COMM=$ac_cv_path_COMM
6305if test -n "$COMM"; then
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6307$as_echo "$COMM" >&6; }
6308else
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310$as_echo "no" >&6; }
6311fi
6312
6313
6314  test -n "$COMM" && break
6315done
6316
6317  else
6318    # The variable is set, but is it from the command line or the environment?
6319
6320    # Try to remove the string !COMM! from our list.
6321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6323      # If it failed, the variable was not from the command line. Ignore it,
6324      # but warn the user (except for BASH, which is always set by the calling BASH).
6325      if test "xCOMM" != xBASH; then
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6327$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6328      fi
6329      # Try to locate tool using the code snippet
6330      for ac_prog in comm
6331do
6332  # Extract the first word of "$ac_prog", so it can be a program name with args.
6333set dummy $ac_prog; ac_word=$2
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6335$as_echo_n "checking for $ac_word... " >&6; }
6336if ${ac_cv_path_COMM+:} false; then :
6337  $as_echo_n "(cached) " >&6
6338else
6339  case $COMM in
6340  [\\/]* | ?:[\\/]*)
6341  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6342  ;;
6343  *)
6344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345for as_dir in $PATH
6346do
6347  IFS=$as_save_IFS
6348  test -z "$as_dir" && as_dir=.
6349    for ac_exec_ext in '' $ac_executable_extensions; do
6350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6351    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353    break 2
6354  fi
6355done
6356  done
6357IFS=$as_save_IFS
6358
6359  ;;
6360esac
6361fi
6362COMM=$ac_cv_path_COMM
6363if test -n "$COMM"; then
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6365$as_echo "$COMM" >&6; }
6366else
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368$as_echo "no" >&6; }
6369fi
6370
6371
6372  test -n "$COMM" && break
6373done
6374
6375    else
6376      # If it succeeded, then it was overridden by the user. We will use it
6377      # for the tool.
6378
6379      # First remove it from the list of overridden variables, so we can test
6380      # for unknown variables in the end.
6381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6382
6383      # Check if we try to supply an empty value
6384      if test "x$COMM" = x; then
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6386$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6388$as_echo_n "checking for COMM... " >&6; }
6389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6390$as_echo "disabled" >&6; }
6391      else
6392        # Check if the provided tool contains a complete path.
6393        tool_specified="$COMM"
6394        tool_basename="${tool_specified##*/}"
6395        if test "x$tool_basename" = "x$tool_specified"; then
6396          # A command without a complete path is provided, search $PATH.
6397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6398$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6399          # Extract the first word of "$tool_basename", so it can be a program name with args.
6400set dummy $tool_basename; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if ${ac_cv_path_COMM+:} false; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  case $COMM in
6407  [\\/]* | ?:[\\/]*)
6408  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6409  ;;
6410  *)
6411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414  IFS=$as_save_IFS
6415  test -z "$as_dir" && as_dir=.
6416    for ac_exec_ext in '' $ac_executable_extensions; do
6417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420    break 2
6421  fi
6422done
6423  done
6424IFS=$as_save_IFS
6425
6426  ;;
6427esac
6428fi
6429COMM=$ac_cv_path_COMM
6430if test -n "$COMM"; then
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6432$as_echo "$COMM" >&6; }
6433else
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; }
6436fi
6437
6438
6439          if test "x$COMM" = x; then
6440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6441          fi
6442        else
6443          # Otherwise we believe it is a complete path. Use it as it is.
6444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6445$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6447$as_echo_n "checking for COMM... " >&6; }
6448          if test ! -x "$tool_specified"; then
6449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6450$as_echo "not found" >&6; }
6451            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6452          fi
6453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6454$as_echo "$tool_specified" >&6; }
6455        fi
6456      fi
6457    fi
6458
6459  fi
6460
6461
6462
6463  if test "x$COMM" = x; then
6464    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6465  fi
6466
6467
6468
6469
6470
6471  # Publish this variable in the help.
6472
6473
6474  if [ -z "${CP+x}" ]; then
6475    # The variable is not set by user, try to locate tool using the code snippet
6476    for ac_prog in cp
6477do
6478  # Extract the first word of "$ac_prog", so it can be a program name with args.
6479set dummy $ac_prog; ac_word=$2
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6481$as_echo_n "checking for $ac_word... " >&6; }
6482if ${ac_cv_path_CP+:} false; then :
6483  $as_echo_n "(cached) " >&6
6484else
6485  case $CP in
6486  [\\/]* | ?:[\\/]*)
6487  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6488  ;;
6489  *)
6490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in $PATH
6492do
6493  IFS=$as_save_IFS
6494  test -z "$as_dir" && as_dir=.
6495    for ac_exec_ext in '' $ac_executable_extensions; do
6496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6497    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6499    break 2
6500  fi
6501done
6502  done
6503IFS=$as_save_IFS
6504
6505  ;;
6506esac
6507fi
6508CP=$ac_cv_path_CP
6509if test -n "$CP"; then
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6511$as_echo "$CP" >&6; }
6512else
6513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
6515fi
6516
6517
6518  test -n "$CP" && break
6519done
6520
6521  else
6522    # The variable is set, but is it from the command line or the environment?
6523
6524    # Try to remove the string !CP! from our list.
6525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6527      # If it failed, the variable was not from the command line. Ignore it,
6528      # but warn the user (except for BASH, which is always set by the calling BASH).
6529      if test "xCP" != xBASH; then
6530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6531$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6532      fi
6533      # Try to locate tool using the code snippet
6534      for ac_prog in cp
6535do
6536  # Extract the first word of "$ac_prog", so it can be a program name with args.
6537set dummy $ac_prog; ac_word=$2
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6539$as_echo_n "checking for $ac_word... " >&6; }
6540if ${ac_cv_path_CP+:} false; then :
6541  $as_echo_n "(cached) " >&6
6542else
6543  case $CP in
6544  [\\/]* | ?:[\\/]*)
6545  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6546  ;;
6547  *)
6548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6549for as_dir in $PATH
6550do
6551  IFS=$as_save_IFS
6552  test -z "$as_dir" && as_dir=.
6553    for ac_exec_ext in '' $ac_executable_extensions; do
6554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6555    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6557    break 2
6558  fi
6559done
6560  done
6561IFS=$as_save_IFS
6562
6563  ;;
6564esac
6565fi
6566CP=$ac_cv_path_CP
6567if test -n "$CP"; then
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6569$as_echo "$CP" >&6; }
6570else
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6572$as_echo "no" >&6; }
6573fi
6574
6575
6576  test -n "$CP" && break
6577done
6578
6579    else
6580      # If it succeeded, then it was overridden by the user. We will use it
6581      # for the tool.
6582
6583      # First remove it from the list of overridden variables, so we can test
6584      # for unknown variables in the end.
6585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6586
6587      # Check if we try to supply an empty value
6588      if test "x$CP" = x; then
6589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6590$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6592$as_echo_n "checking for CP... " >&6; }
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6594$as_echo "disabled" >&6; }
6595      else
6596        # Check if the provided tool contains a complete path.
6597        tool_specified="$CP"
6598        tool_basename="${tool_specified##*/}"
6599        if test "x$tool_basename" = "x$tool_specified"; then
6600          # A command without a complete path is provided, search $PATH.
6601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6602$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6603          # Extract the first word of "$tool_basename", so it can be a program name with args.
6604set dummy $tool_basename; ac_word=$2
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6606$as_echo_n "checking for $ac_word... " >&6; }
6607if ${ac_cv_path_CP+:} false; then :
6608  $as_echo_n "(cached) " >&6
6609else
6610  case $CP in
6611  [\\/]* | ?:[\\/]*)
6612  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6613  ;;
6614  *)
6615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6616for as_dir in $PATH
6617do
6618  IFS=$as_save_IFS
6619  test -z "$as_dir" && as_dir=.
6620    for ac_exec_ext in '' $ac_executable_extensions; do
6621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6622    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6624    break 2
6625  fi
6626done
6627  done
6628IFS=$as_save_IFS
6629
6630  ;;
6631esac
6632fi
6633CP=$ac_cv_path_CP
6634if test -n "$CP"; then
6635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6636$as_echo "$CP" >&6; }
6637else
6638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6639$as_echo "no" >&6; }
6640fi
6641
6642
6643          if test "x$CP" = x; then
6644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6645          fi
6646        else
6647          # Otherwise we believe it is a complete path. Use it as it is.
6648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6649$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6651$as_echo_n "checking for CP... " >&6; }
6652          if test ! -x "$tool_specified"; then
6653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6654$as_echo "not found" >&6; }
6655            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6656          fi
6657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6658$as_echo "$tool_specified" >&6; }
6659        fi
6660      fi
6661    fi
6662
6663  fi
6664
6665
6666
6667  if test "x$CP" = x; then
6668    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6669  fi
6670
6671
6672
6673
6674
6675  # Publish this variable in the help.
6676
6677
6678  if [ -z "${CUT+x}" ]; then
6679    # The variable is not set by user, try to locate tool using the code snippet
6680    for ac_prog in cut
6681do
6682  # Extract the first word of "$ac_prog", so it can be a program name with args.
6683set dummy $ac_prog; ac_word=$2
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6685$as_echo_n "checking for $ac_word... " >&6; }
6686if ${ac_cv_path_CUT+:} false; then :
6687  $as_echo_n "(cached) " >&6
6688else
6689  case $CUT in
6690  [\\/]* | ?:[\\/]*)
6691  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6692  ;;
6693  *)
6694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6695for as_dir in $PATH
6696do
6697  IFS=$as_save_IFS
6698  test -z "$as_dir" && as_dir=.
6699    for ac_exec_ext in '' $ac_executable_extensions; do
6700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6701    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6703    break 2
6704  fi
6705done
6706  done
6707IFS=$as_save_IFS
6708
6709  ;;
6710esac
6711fi
6712CUT=$ac_cv_path_CUT
6713if test -n "$CUT"; then
6714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6715$as_echo "$CUT" >&6; }
6716else
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6718$as_echo "no" >&6; }
6719fi
6720
6721
6722  test -n "$CUT" && break
6723done
6724
6725  else
6726    # The variable is set, but is it from the command line or the environment?
6727
6728    # Try to remove the string !CUT! from our list.
6729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6731      # If it failed, the variable was not from the command line. Ignore it,
6732      # but warn the user (except for BASH, which is always set by the calling BASH).
6733      if test "xCUT" != xBASH; then
6734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6735$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6736      fi
6737      # Try to locate tool using the code snippet
6738      for ac_prog in cut
6739do
6740  # Extract the first word of "$ac_prog", so it can be a program name with args.
6741set dummy $ac_prog; ac_word=$2
6742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743$as_echo_n "checking for $ac_word... " >&6; }
6744if ${ac_cv_path_CUT+:} false; then :
6745  $as_echo_n "(cached) " >&6
6746else
6747  case $CUT in
6748  [\\/]* | ?:[\\/]*)
6749  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6750  ;;
6751  *)
6752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in $PATH
6754do
6755  IFS=$as_save_IFS
6756  test -z "$as_dir" && as_dir=.
6757    for ac_exec_ext in '' $ac_executable_extensions; do
6758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761    break 2
6762  fi
6763done
6764  done
6765IFS=$as_save_IFS
6766
6767  ;;
6768esac
6769fi
6770CUT=$ac_cv_path_CUT
6771if test -n "$CUT"; then
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6773$as_echo "$CUT" >&6; }
6774else
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776$as_echo "no" >&6; }
6777fi
6778
6779
6780  test -n "$CUT" && break
6781done
6782
6783    else
6784      # If it succeeded, then it was overridden by the user. We will use it
6785      # for the tool.
6786
6787      # First remove it from the list of overridden variables, so we can test
6788      # for unknown variables in the end.
6789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6790
6791      # Check if we try to supply an empty value
6792      if test "x$CUT" = x; then
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6794$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6796$as_echo_n "checking for CUT... " >&6; }
6797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6798$as_echo "disabled" >&6; }
6799      else
6800        # Check if the provided tool contains a complete path.
6801        tool_specified="$CUT"
6802        tool_basename="${tool_specified##*/}"
6803        if test "x$tool_basename" = "x$tool_specified"; then
6804          # A command without a complete path is provided, search $PATH.
6805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6806$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6807          # Extract the first word of "$tool_basename", so it can be a program name with args.
6808set dummy $tool_basename; ac_word=$2
6809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6810$as_echo_n "checking for $ac_word... " >&6; }
6811if ${ac_cv_path_CUT+:} false; then :
6812  $as_echo_n "(cached) " >&6
6813else
6814  case $CUT in
6815  [\\/]* | ?:[\\/]*)
6816  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6817  ;;
6818  *)
6819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6820for as_dir in $PATH
6821do
6822  IFS=$as_save_IFS
6823  test -z "$as_dir" && as_dir=.
6824    for ac_exec_ext in '' $ac_executable_extensions; do
6825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6826    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6828    break 2
6829  fi
6830done
6831  done
6832IFS=$as_save_IFS
6833
6834  ;;
6835esac
6836fi
6837CUT=$ac_cv_path_CUT
6838if test -n "$CUT"; then
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6840$as_echo "$CUT" >&6; }
6841else
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6843$as_echo "no" >&6; }
6844fi
6845
6846
6847          if test "x$CUT" = x; then
6848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6849          fi
6850        else
6851          # Otherwise we believe it is a complete path. Use it as it is.
6852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6853$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6855$as_echo_n "checking for CUT... " >&6; }
6856          if test ! -x "$tool_specified"; then
6857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6858$as_echo "not found" >&6; }
6859            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6860          fi
6861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6862$as_echo "$tool_specified" >&6; }
6863        fi
6864      fi
6865    fi
6866
6867  fi
6868
6869
6870
6871  if test "x$CUT" = x; then
6872    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6873  fi
6874
6875
6876
6877
6878
6879  # Publish this variable in the help.
6880
6881
6882  if [ -z "${DATE+x}" ]; then
6883    # The variable is not set by user, try to locate tool using the code snippet
6884    for ac_prog in date
6885do
6886  # Extract the first word of "$ac_prog", so it can be a program name with args.
6887set dummy $ac_prog; ac_word=$2
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6889$as_echo_n "checking for $ac_word... " >&6; }
6890if ${ac_cv_path_DATE+:} false; then :
6891  $as_echo_n "(cached) " >&6
6892else
6893  case $DATE in
6894  [\\/]* | ?:[\\/]*)
6895  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6896  ;;
6897  *)
6898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6899for as_dir in $PATH
6900do
6901  IFS=$as_save_IFS
6902  test -z "$as_dir" && as_dir=.
6903    for ac_exec_ext in '' $ac_executable_extensions; do
6904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6905    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6907    break 2
6908  fi
6909done
6910  done
6911IFS=$as_save_IFS
6912
6913  ;;
6914esac
6915fi
6916DATE=$ac_cv_path_DATE
6917if test -n "$DATE"; then
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6919$as_echo "$DATE" >&6; }
6920else
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6922$as_echo "no" >&6; }
6923fi
6924
6925
6926  test -n "$DATE" && break
6927done
6928
6929  else
6930    # The variable is set, but is it from the command line or the environment?
6931
6932    # Try to remove the string !DATE! from our list.
6933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6935      # If it failed, the variable was not from the command line. Ignore it,
6936      # but warn the user (except for BASH, which is always set by the calling BASH).
6937      if test "xDATE" != xBASH; then
6938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6939$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6940      fi
6941      # Try to locate tool using the code snippet
6942      for ac_prog in date
6943do
6944  # Extract the first word of "$ac_prog", so it can be a program name with args.
6945set dummy $ac_prog; ac_word=$2
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6947$as_echo_n "checking for $ac_word... " >&6; }
6948if ${ac_cv_path_DATE+:} false; then :
6949  $as_echo_n "(cached) " >&6
6950else
6951  case $DATE in
6952  [\\/]* | ?:[\\/]*)
6953  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6954  ;;
6955  *)
6956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6957for as_dir in $PATH
6958do
6959  IFS=$as_save_IFS
6960  test -z "$as_dir" && as_dir=.
6961    for ac_exec_ext in '' $ac_executable_extensions; do
6962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6963    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6965    break 2
6966  fi
6967done
6968  done
6969IFS=$as_save_IFS
6970
6971  ;;
6972esac
6973fi
6974DATE=$ac_cv_path_DATE
6975if test -n "$DATE"; then
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6977$as_echo "$DATE" >&6; }
6978else
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6980$as_echo "no" >&6; }
6981fi
6982
6983
6984  test -n "$DATE" && break
6985done
6986
6987    else
6988      # If it succeeded, then it was overridden by the user. We will use it
6989      # for the tool.
6990
6991      # First remove it from the list of overridden variables, so we can test
6992      # for unknown variables in the end.
6993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6994
6995      # Check if we try to supply an empty value
6996      if test "x$DATE" = x; then
6997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6998$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7000$as_echo_n "checking for DATE... " >&6; }
7001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7002$as_echo "disabled" >&6; }
7003      else
7004        # Check if the provided tool contains a complete path.
7005        tool_specified="$DATE"
7006        tool_basename="${tool_specified##*/}"
7007        if test "x$tool_basename" = "x$tool_specified"; then
7008          # A command without a complete path is provided, search $PATH.
7009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7010$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7011          # Extract the first word of "$tool_basename", so it can be a program name with args.
7012set dummy $tool_basename; ac_word=$2
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014$as_echo_n "checking for $ac_word... " >&6; }
7015if ${ac_cv_path_DATE+:} false; then :
7016  $as_echo_n "(cached) " >&6
7017else
7018  case $DATE in
7019  [\\/]* | ?:[\\/]*)
7020  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7021  ;;
7022  *)
7023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026  IFS=$as_save_IFS
7027  test -z "$as_dir" && as_dir=.
7028    for ac_exec_ext in '' $ac_executable_extensions; do
7029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7030    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032    break 2
7033  fi
7034done
7035  done
7036IFS=$as_save_IFS
7037
7038  ;;
7039esac
7040fi
7041DATE=$ac_cv_path_DATE
7042if test -n "$DATE"; then
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7044$as_echo "$DATE" >&6; }
7045else
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047$as_echo "no" >&6; }
7048fi
7049
7050
7051          if test "x$DATE" = x; then
7052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7053          fi
7054        else
7055          # Otherwise we believe it is a complete path. Use it as it is.
7056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7057$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7059$as_echo_n "checking for DATE... " >&6; }
7060          if test ! -x "$tool_specified"; then
7061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7062$as_echo "not found" >&6; }
7063            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7064          fi
7065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7066$as_echo "$tool_specified" >&6; }
7067        fi
7068      fi
7069    fi
7070
7071  fi
7072
7073
7074
7075  if test "x$DATE" = x; then
7076    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7077  fi
7078
7079
7080
7081
7082
7083  # Publish this variable in the help.
7084
7085
7086  if [ -z "${DIFF+x}" ]; then
7087    # The variable is not set by user, try to locate tool using the code snippet
7088    for ac_prog in gdiff diff
7089do
7090  # Extract the first word of "$ac_prog", so it can be a program name with args.
7091set dummy $ac_prog; ac_word=$2
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7093$as_echo_n "checking for $ac_word... " >&6; }
7094if ${ac_cv_path_DIFF+:} false; then :
7095  $as_echo_n "(cached) " >&6
7096else
7097  case $DIFF in
7098  [\\/]* | ?:[\\/]*)
7099  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7100  ;;
7101  *)
7102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103for as_dir in $PATH
7104do
7105  IFS=$as_save_IFS
7106  test -z "$as_dir" && as_dir=.
7107    for ac_exec_ext in '' $ac_executable_extensions; do
7108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7109    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7111    break 2
7112  fi
7113done
7114  done
7115IFS=$as_save_IFS
7116
7117  ;;
7118esac
7119fi
7120DIFF=$ac_cv_path_DIFF
7121if test -n "$DIFF"; then
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7123$as_echo "$DIFF" >&6; }
7124else
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7126$as_echo "no" >&6; }
7127fi
7128
7129
7130  test -n "$DIFF" && break
7131done
7132
7133  else
7134    # The variable is set, but is it from the command line or the environment?
7135
7136    # Try to remove the string !DIFF! from our list.
7137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7139      # If it failed, the variable was not from the command line. Ignore it,
7140      # but warn the user (except for BASH, which is always set by the calling BASH).
7141      if test "xDIFF" != xBASH; then
7142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7143$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7144      fi
7145      # Try to locate tool using the code snippet
7146      for ac_prog in gdiff diff
7147do
7148  # Extract the first word of "$ac_prog", so it can be a program name with args.
7149set dummy $ac_prog; ac_word=$2
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151$as_echo_n "checking for $ac_word... " >&6; }
7152if ${ac_cv_path_DIFF+:} false; then :
7153  $as_echo_n "(cached) " >&6
7154else
7155  case $DIFF in
7156  [\\/]* | ?:[\\/]*)
7157  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7158  ;;
7159  *)
7160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7161for as_dir in $PATH
7162do
7163  IFS=$as_save_IFS
7164  test -z "$as_dir" && as_dir=.
7165    for ac_exec_ext in '' $ac_executable_extensions; do
7166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7167    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7169    break 2
7170  fi
7171done
7172  done
7173IFS=$as_save_IFS
7174
7175  ;;
7176esac
7177fi
7178DIFF=$ac_cv_path_DIFF
7179if test -n "$DIFF"; then
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7181$as_echo "$DIFF" >&6; }
7182else
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184$as_echo "no" >&6; }
7185fi
7186
7187
7188  test -n "$DIFF" && break
7189done
7190
7191    else
7192      # If it succeeded, then it was overridden by the user. We will use it
7193      # for the tool.
7194
7195      # First remove it from the list of overridden variables, so we can test
7196      # for unknown variables in the end.
7197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7198
7199      # Check if we try to supply an empty value
7200      if test "x$DIFF" = x; then
7201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7202$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7204$as_echo_n "checking for DIFF... " >&6; }
7205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7206$as_echo "disabled" >&6; }
7207      else
7208        # Check if the provided tool contains a complete path.
7209        tool_specified="$DIFF"
7210        tool_basename="${tool_specified##*/}"
7211        if test "x$tool_basename" = "x$tool_specified"; then
7212          # A command without a complete path is provided, search $PATH.
7213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7214$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7215          # Extract the first word of "$tool_basename", so it can be a program name with args.
7216set dummy $tool_basename; ac_word=$2
7217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7218$as_echo_n "checking for $ac_word... " >&6; }
7219if ${ac_cv_path_DIFF+:} false; then :
7220  $as_echo_n "(cached) " >&6
7221else
7222  case $DIFF in
7223  [\\/]* | ?:[\\/]*)
7224  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7225  ;;
7226  *)
7227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7228for as_dir in $PATH
7229do
7230  IFS=$as_save_IFS
7231  test -z "$as_dir" && as_dir=.
7232    for ac_exec_ext in '' $ac_executable_extensions; do
7233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7234    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7236    break 2
7237  fi
7238done
7239  done
7240IFS=$as_save_IFS
7241
7242  ;;
7243esac
7244fi
7245DIFF=$ac_cv_path_DIFF
7246if test -n "$DIFF"; then
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7248$as_echo "$DIFF" >&6; }
7249else
7250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7251$as_echo "no" >&6; }
7252fi
7253
7254
7255          if test "x$DIFF" = x; then
7256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7257          fi
7258        else
7259          # Otherwise we believe it is a complete path. Use it as it is.
7260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7261$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7263$as_echo_n "checking for DIFF... " >&6; }
7264          if test ! -x "$tool_specified"; then
7265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7266$as_echo "not found" >&6; }
7267            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7268          fi
7269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7270$as_echo "$tool_specified" >&6; }
7271        fi
7272      fi
7273    fi
7274
7275  fi
7276
7277
7278
7279  if test "x$DIFF" = x; then
7280    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7281  fi
7282
7283
7284
7285
7286
7287  # Publish this variable in the help.
7288
7289
7290  if [ -z "${DIRNAME+x}" ]; then
7291    # The variable is not set by user, try to locate tool using the code snippet
7292    for ac_prog in dirname
7293do
7294  # Extract the first word of "$ac_prog", so it can be a program name with args.
7295set dummy $ac_prog; ac_word=$2
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297$as_echo_n "checking for $ac_word... " >&6; }
7298if ${ac_cv_path_DIRNAME+:} false; then :
7299  $as_echo_n "(cached) " >&6
7300else
7301  case $DIRNAME in
7302  [\\/]* | ?:[\\/]*)
7303  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7304  ;;
7305  *)
7306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7307for as_dir in $PATH
7308do
7309  IFS=$as_save_IFS
7310  test -z "$as_dir" && as_dir=.
7311    for ac_exec_ext in '' $ac_executable_extensions; do
7312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7313    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7315    break 2
7316  fi
7317done
7318  done
7319IFS=$as_save_IFS
7320
7321  ;;
7322esac
7323fi
7324DIRNAME=$ac_cv_path_DIRNAME
7325if test -n "$DIRNAME"; then
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7327$as_echo "$DIRNAME" >&6; }
7328else
7329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7330$as_echo "no" >&6; }
7331fi
7332
7333
7334  test -n "$DIRNAME" && break
7335done
7336
7337  else
7338    # The variable is set, but is it from the command line or the environment?
7339
7340    # Try to remove the string !DIRNAME! from our list.
7341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7343      # If it failed, the variable was not from the command line. Ignore it,
7344      # but warn the user (except for BASH, which is always set by the calling BASH).
7345      if test "xDIRNAME" != xBASH; then
7346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7347$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7348      fi
7349      # Try to locate tool using the code snippet
7350      for ac_prog in dirname
7351do
7352  # Extract the first word of "$ac_prog", so it can be a program name with args.
7353set dummy $ac_prog; ac_word=$2
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355$as_echo_n "checking for $ac_word... " >&6; }
7356if ${ac_cv_path_DIRNAME+:} false; then :
7357  $as_echo_n "(cached) " >&6
7358else
7359  case $DIRNAME in
7360  [\\/]* | ?:[\\/]*)
7361  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7362  ;;
7363  *)
7364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365for as_dir in $PATH
7366do
7367  IFS=$as_save_IFS
7368  test -z "$as_dir" && as_dir=.
7369    for ac_exec_ext in '' $ac_executable_extensions; do
7370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373    break 2
7374  fi
7375done
7376  done
7377IFS=$as_save_IFS
7378
7379  ;;
7380esac
7381fi
7382DIRNAME=$ac_cv_path_DIRNAME
7383if test -n "$DIRNAME"; then
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7385$as_echo "$DIRNAME" >&6; }
7386else
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
7389fi
7390
7391
7392  test -n "$DIRNAME" && break
7393done
7394
7395    else
7396      # If it succeeded, then it was overridden by the user. We will use it
7397      # for the tool.
7398
7399      # First remove it from the list of overridden variables, so we can test
7400      # for unknown variables in the end.
7401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7402
7403      # Check if we try to supply an empty value
7404      if test "x$DIRNAME" = x; then
7405        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7406$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7408$as_echo_n "checking for DIRNAME... " >&6; }
7409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7410$as_echo "disabled" >&6; }
7411      else
7412        # Check if the provided tool contains a complete path.
7413        tool_specified="$DIRNAME"
7414        tool_basename="${tool_specified##*/}"
7415        if test "x$tool_basename" = "x$tool_specified"; then
7416          # A command without a complete path is provided, search $PATH.
7417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7418$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7419          # Extract the first word of "$tool_basename", so it can be a program name with args.
7420set dummy $tool_basename; ac_word=$2
7421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7422$as_echo_n "checking for $ac_word... " >&6; }
7423if ${ac_cv_path_DIRNAME+:} false; then :
7424  $as_echo_n "(cached) " >&6
7425else
7426  case $DIRNAME in
7427  [\\/]* | ?:[\\/]*)
7428  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7429  ;;
7430  *)
7431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7432for as_dir in $PATH
7433do
7434  IFS=$as_save_IFS
7435  test -z "$as_dir" && as_dir=.
7436    for ac_exec_ext in '' $ac_executable_extensions; do
7437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7438    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7440    break 2
7441  fi
7442done
7443  done
7444IFS=$as_save_IFS
7445
7446  ;;
7447esac
7448fi
7449DIRNAME=$ac_cv_path_DIRNAME
7450if test -n "$DIRNAME"; then
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7452$as_echo "$DIRNAME" >&6; }
7453else
7454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7455$as_echo "no" >&6; }
7456fi
7457
7458
7459          if test "x$DIRNAME" = x; then
7460            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7461          fi
7462        else
7463          # Otherwise we believe it is a complete path. Use it as it is.
7464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7465$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7466          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7467$as_echo_n "checking for DIRNAME... " >&6; }
7468          if test ! -x "$tool_specified"; then
7469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7470$as_echo "not found" >&6; }
7471            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7472          fi
7473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7474$as_echo "$tool_specified" >&6; }
7475        fi
7476      fi
7477    fi
7478
7479  fi
7480
7481
7482
7483  if test "x$DIRNAME" = x; then
7484    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7485  fi
7486
7487
7488
7489
7490
7491  # Publish this variable in the help.
7492
7493
7494  if [ -z "${ECHO+x}" ]; then
7495    # The variable is not set by user, try to locate tool using the code snippet
7496    for ac_prog in echo
7497do
7498  # Extract the first word of "$ac_prog", so it can be a program name with args.
7499set dummy $ac_prog; ac_word=$2
7500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7501$as_echo_n "checking for $ac_word... " >&6; }
7502if ${ac_cv_path_ECHO+:} false; then :
7503  $as_echo_n "(cached) " >&6
7504else
7505  case $ECHO in
7506  [\\/]* | ?:[\\/]*)
7507  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7508  ;;
7509  *)
7510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513  IFS=$as_save_IFS
7514  test -z "$as_dir" && as_dir=.
7515    for ac_exec_ext in '' $ac_executable_extensions; do
7516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7517    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519    break 2
7520  fi
7521done
7522  done
7523IFS=$as_save_IFS
7524
7525  ;;
7526esac
7527fi
7528ECHO=$ac_cv_path_ECHO
7529if test -n "$ECHO"; then
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7531$as_echo "$ECHO" >&6; }
7532else
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
7535fi
7536
7537
7538  test -n "$ECHO" && break
7539done
7540
7541  else
7542    # The variable is set, but is it from the command line or the environment?
7543
7544    # Try to remove the string !ECHO! from our list.
7545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7547      # If it failed, the variable was not from the command line. Ignore it,
7548      # but warn the user (except for BASH, which is always set by the calling BASH).
7549      if test "xECHO" != xBASH; then
7550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7551$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7552      fi
7553      # Try to locate tool using the code snippet
7554      for ac_prog in echo
7555do
7556  # Extract the first word of "$ac_prog", so it can be a program name with args.
7557set dummy $ac_prog; ac_word=$2
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559$as_echo_n "checking for $ac_word... " >&6; }
7560if ${ac_cv_path_ECHO+:} false; then :
7561  $as_echo_n "(cached) " >&6
7562else
7563  case $ECHO in
7564  [\\/]* | ?:[\\/]*)
7565  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7566  ;;
7567  *)
7568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7569for as_dir in $PATH
7570do
7571  IFS=$as_save_IFS
7572  test -z "$as_dir" && as_dir=.
7573    for ac_exec_ext in '' $ac_executable_extensions; do
7574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7575    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7577    break 2
7578  fi
7579done
7580  done
7581IFS=$as_save_IFS
7582
7583  ;;
7584esac
7585fi
7586ECHO=$ac_cv_path_ECHO
7587if test -n "$ECHO"; then
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7589$as_echo "$ECHO" >&6; }
7590else
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592$as_echo "no" >&6; }
7593fi
7594
7595
7596  test -n "$ECHO" && break
7597done
7598
7599    else
7600      # If it succeeded, then it was overridden by the user. We will use it
7601      # for the tool.
7602
7603      # First remove it from the list of overridden variables, so we can test
7604      # for unknown variables in the end.
7605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7606
7607      # Check if we try to supply an empty value
7608      if test "x$ECHO" = x; then
7609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7610$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7612$as_echo_n "checking for ECHO... " >&6; }
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7614$as_echo "disabled" >&6; }
7615      else
7616        # Check if the provided tool contains a complete path.
7617        tool_specified="$ECHO"
7618        tool_basename="${tool_specified##*/}"
7619        if test "x$tool_basename" = "x$tool_specified"; then
7620          # A command without a complete path is provided, search $PATH.
7621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7622$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7623          # Extract the first word of "$tool_basename", so it can be a program name with args.
7624set dummy $tool_basename; ac_word=$2
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7626$as_echo_n "checking for $ac_word... " >&6; }
7627if ${ac_cv_path_ECHO+:} false; then :
7628  $as_echo_n "(cached) " >&6
7629else
7630  case $ECHO in
7631  [\\/]* | ?:[\\/]*)
7632  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7633  ;;
7634  *)
7635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7636for as_dir in $PATH
7637do
7638  IFS=$as_save_IFS
7639  test -z "$as_dir" && as_dir=.
7640    for ac_exec_ext in '' $ac_executable_extensions; do
7641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7642    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7644    break 2
7645  fi
7646done
7647  done
7648IFS=$as_save_IFS
7649
7650  ;;
7651esac
7652fi
7653ECHO=$ac_cv_path_ECHO
7654if test -n "$ECHO"; then
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7656$as_echo "$ECHO" >&6; }
7657else
7658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7659$as_echo "no" >&6; }
7660fi
7661
7662
7663          if test "x$ECHO" = x; then
7664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7665          fi
7666        else
7667          # Otherwise we believe it is a complete path. Use it as it is.
7668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7669$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7671$as_echo_n "checking for ECHO... " >&6; }
7672          if test ! -x "$tool_specified"; then
7673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7674$as_echo "not found" >&6; }
7675            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7676          fi
7677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7678$as_echo "$tool_specified" >&6; }
7679        fi
7680      fi
7681    fi
7682
7683  fi
7684
7685
7686
7687  if test "x$ECHO" = x; then
7688    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7689  fi
7690
7691
7692
7693
7694
7695  # Publish this variable in the help.
7696
7697
7698  if [ -z "${EXPR+x}" ]; then
7699    # The variable is not set by user, try to locate tool using the code snippet
7700    for ac_prog in expr
7701do
7702  # Extract the first word of "$ac_prog", so it can be a program name with args.
7703set dummy $ac_prog; ac_word=$2
7704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7705$as_echo_n "checking for $ac_word... " >&6; }
7706if ${ac_cv_path_EXPR+:} false; then :
7707  $as_echo_n "(cached) " >&6
7708else
7709  case $EXPR in
7710  [\\/]* | ?:[\\/]*)
7711  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7712  ;;
7713  *)
7714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715for as_dir in $PATH
7716do
7717  IFS=$as_save_IFS
7718  test -z "$as_dir" && as_dir=.
7719    for ac_exec_ext in '' $ac_executable_extensions; do
7720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7721    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723    break 2
7724  fi
7725done
7726  done
7727IFS=$as_save_IFS
7728
7729  ;;
7730esac
7731fi
7732EXPR=$ac_cv_path_EXPR
7733if test -n "$EXPR"; then
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7735$as_echo "$EXPR" >&6; }
7736else
7737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7738$as_echo "no" >&6; }
7739fi
7740
7741
7742  test -n "$EXPR" && break
7743done
7744
7745  else
7746    # The variable is set, but is it from the command line or the environment?
7747
7748    # Try to remove the string !EXPR! from our list.
7749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7751      # If it failed, the variable was not from the command line. Ignore it,
7752      # but warn the user (except for BASH, which is always set by the calling BASH).
7753      if test "xEXPR" != xBASH; then
7754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7755$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7756      fi
7757      # Try to locate tool using the code snippet
7758      for ac_prog in expr
7759do
7760  # Extract the first word of "$ac_prog", so it can be a program name with args.
7761set dummy $ac_prog; ac_word=$2
7762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7763$as_echo_n "checking for $ac_word... " >&6; }
7764if ${ac_cv_path_EXPR+:} false; then :
7765  $as_echo_n "(cached) " >&6
7766else
7767  case $EXPR in
7768  [\\/]* | ?:[\\/]*)
7769  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7770  ;;
7771  *)
7772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7773for as_dir in $PATH
7774do
7775  IFS=$as_save_IFS
7776  test -z "$as_dir" && as_dir=.
7777    for ac_exec_ext in '' $ac_executable_extensions; do
7778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7779    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7781    break 2
7782  fi
7783done
7784  done
7785IFS=$as_save_IFS
7786
7787  ;;
7788esac
7789fi
7790EXPR=$ac_cv_path_EXPR
7791if test -n "$EXPR"; then
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7793$as_echo "$EXPR" >&6; }
7794else
7795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7796$as_echo "no" >&6; }
7797fi
7798
7799
7800  test -n "$EXPR" && break
7801done
7802
7803    else
7804      # If it succeeded, then it was overridden by the user. We will use it
7805      # for the tool.
7806
7807      # First remove it from the list of overridden variables, so we can test
7808      # for unknown variables in the end.
7809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7810
7811      # Check if we try to supply an empty value
7812      if test "x$EXPR" = x; then
7813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7814$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7816$as_echo_n "checking for EXPR... " >&6; }
7817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7818$as_echo "disabled" >&6; }
7819      else
7820        # Check if the provided tool contains a complete path.
7821        tool_specified="$EXPR"
7822        tool_basename="${tool_specified##*/}"
7823        if test "x$tool_basename" = "x$tool_specified"; then
7824          # A command without a complete path is provided, search $PATH.
7825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7826$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7827          # Extract the first word of "$tool_basename", so it can be a program name with args.
7828set dummy $tool_basename; ac_word=$2
7829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7830$as_echo_n "checking for $ac_word... " >&6; }
7831if ${ac_cv_path_EXPR+:} false; then :
7832  $as_echo_n "(cached) " >&6
7833else
7834  case $EXPR in
7835  [\\/]* | ?:[\\/]*)
7836  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7837  ;;
7838  *)
7839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7840for as_dir in $PATH
7841do
7842  IFS=$as_save_IFS
7843  test -z "$as_dir" && as_dir=.
7844    for ac_exec_ext in '' $ac_executable_extensions; do
7845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7846    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7848    break 2
7849  fi
7850done
7851  done
7852IFS=$as_save_IFS
7853
7854  ;;
7855esac
7856fi
7857EXPR=$ac_cv_path_EXPR
7858if test -n "$EXPR"; then
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7860$as_echo "$EXPR" >&6; }
7861else
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7863$as_echo "no" >&6; }
7864fi
7865
7866
7867          if test "x$EXPR" = x; then
7868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7869          fi
7870        else
7871          # Otherwise we believe it is a complete path. Use it as it is.
7872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7873$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7875$as_echo_n "checking for EXPR... " >&6; }
7876          if test ! -x "$tool_specified"; then
7877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7878$as_echo "not found" >&6; }
7879            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7880          fi
7881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7882$as_echo "$tool_specified" >&6; }
7883        fi
7884      fi
7885    fi
7886
7887  fi
7888
7889
7890
7891  if test "x$EXPR" = x; then
7892    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7893  fi
7894
7895
7896
7897
7898
7899  # Publish this variable in the help.
7900
7901
7902  if [ -z "${FILE+x}" ]; then
7903    # The variable is not set by user, try to locate tool using the code snippet
7904    for ac_prog in file
7905do
7906  # Extract the first word of "$ac_prog", so it can be a program name with args.
7907set dummy $ac_prog; ac_word=$2
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909$as_echo_n "checking for $ac_word... " >&6; }
7910if ${ac_cv_path_FILE+:} false; then :
7911  $as_echo_n "(cached) " >&6
7912else
7913  case $FILE in
7914  [\\/]* | ?:[\\/]*)
7915  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7916  ;;
7917  *)
7918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919for as_dir in $PATH
7920do
7921  IFS=$as_save_IFS
7922  test -z "$as_dir" && as_dir=.
7923    for ac_exec_ext in '' $ac_executable_extensions; do
7924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7925    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7927    break 2
7928  fi
7929done
7930  done
7931IFS=$as_save_IFS
7932
7933  ;;
7934esac
7935fi
7936FILE=$ac_cv_path_FILE
7937if test -n "$FILE"; then
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7939$as_echo "$FILE" >&6; }
7940else
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942$as_echo "no" >&6; }
7943fi
7944
7945
7946  test -n "$FILE" && break
7947done
7948
7949  else
7950    # The variable is set, but is it from the command line or the environment?
7951
7952    # Try to remove the string !FILE! from our list.
7953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7955      # If it failed, the variable was not from the command line. Ignore it,
7956      # but warn the user (except for BASH, which is always set by the calling BASH).
7957      if test "xFILE" != xBASH; then
7958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7959$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7960      fi
7961      # Try to locate tool using the code snippet
7962      for ac_prog in file
7963do
7964  # Extract the first word of "$ac_prog", so it can be a program name with args.
7965set dummy $ac_prog; ac_word=$2
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7967$as_echo_n "checking for $ac_word... " >&6; }
7968if ${ac_cv_path_FILE+:} false; then :
7969  $as_echo_n "(cached) " >&6
7970else
7971  case $FILE in
7972  [\\/]* | ?:[\\/]*)
7973  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7974  ;;
7975  *)
7976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977for as_dir in $PATH
7978do
7979  IFS=$as_save_IFS
7980  test -z "$as_dir" && as_dir=.
7981    for ac_exec_ext in '' $ac_executable_extensions; do
7982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7983    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7985    break 2
7986  fi
7987done
7988  done
7989IFS=$as_save_IFS
7990
7991  ;;
7992esac
7993fi
7994FILE=$ac_cv_path_FILE
7995if test -n "$FILE"; then
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7997$as_echo "$FILE" >&6; }
7998else
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8000$as_echo "no" >&6; }
8001fi
8002
8003
8004  test -n "$FILE" && break
8005done
8006
8007    else
8008      # If it succeeded, then it was overridden by the user. We will use it
8009      # for the tool.
8010
8011      # First remove it from the list of overridden variables, so we can test
8012      # for unknown variables in the end.
8013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8014
8015      # Check if we try to supply an empty value
8016      if test "x$FILE" = x; then
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8018$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8020$as_echo_n "checking for FILE... " >&6; }
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8022$as_echo "disabled" >&6; }
8023      else
8024        # Check if the provided tool contains a complete path.
8025        tool_specified="$FILE"
8026        tool_basename="${tool_specified##*/}"
8027        if test "x$tool_basename" = "x$tool_specified"; then
8028          # A command without a complete path is provided, search $PATH.
8029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8030$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8031          # Extract the first word of "$tool_basename", so it can be a program name with args.
8032set dummy $tool_basename; ac_word=$2
8033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8034$as_echo_n "checking for $ac_word... " >&6; }
8035if ${ac_cv_path_FILE+:} false; then :
8036  $as_echo_n "(cached) " >&6
8037else
8038  case $FILE in
8039  [\\/]* | ?:[\\/]*)
8040  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8041  ;;
8042  *)
8043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8044for as_dir in $PATH
8045do
8046  IFS=$as_save_IFS
8047  test -z "$as_dir" && as_dir=.
8048    for ac_exec_ext in '' $ac_executable_extensions; do
8049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8050    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8052    break 2
8053  fi
8054done
8055  done
8056IFS=$as_save_IFS
8057
8058  ;;
8059esac
8060fi
8061FILE=$ac_cv_path_FILE
8062if test -n "$FILE"; then
8063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8064$as_echo "$FILE" >&6; }
8065else
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8067$as_echo "no" >&6; }
8068fi
8069
8070
8071          if test "x$FILE" = x; then
8072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8073          fi
8074        else
8075          # Otherwise we believe it is a complete path. Use it as it is.
8076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8077$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8079$as_echo_n "checking for FILE... " >&6; }
8080          if test ! -x "$tool_specified"; then
8081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8082$as_echo "not found" >&6; }
8083            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8084          fi
8085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8086$as_echo "$tool_specified" >&6; }
8087        fi
8088      fi
8089    fi
8090
8091  fi
8092
8093
8094
8095  if test "x$FILE" = x; then
8096    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8097  fi
8098
8099
8100
8101
8102
8103  # Publish this variable in the help.
8104
8105
8106  if [ -z "${FIND+x}" ]; then
8107    # The variable is not set by user, try to locate tool using the code snippet
8108    for ac_prog in find
8109do
8110  # Extract the first word of "$ac_prog", so it can be a program name with args.
8111set dummy $ac_prog; ac_word=$2
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8113$as_echo_n "checking for $ac_word... " >&6; }
8114if ${ac_cv_path_FIND+:} false; then :
8115  $as_echo_n "(cached) " >&6
8116else
8117  case $FIND in
8118  [\\/]* | ?:[\\/]*)
8119  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8120  ;;
8121  *)
8122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8123for as_dir in $PATH
8124do
8125  IFS=$as_save_IFS
8126  test -z "$as_dir" && as_dir=.
8127    for ac_exec_ext in '' $ac_executable_extensions; do
8128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8129    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8131    break 2
8132  fi
8133done
8134  done
8135IFS=$as_save_IFS
8136
8137  ;;
8138esac
8139fi
8140FIND=$ac_cv_path_FIND
8141if test -n "$FIND"; then
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8143$as_echo "$FIND" >&6; }
8144else
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8146$as_echo "no" >&6; }
8147fi
8148
8149
8150  test -n "$FIND" && break
8151done
8152
8153  else
8154    # The variable is set, but is it from the command line or the environment?
8155
8156    # Try to remove the string !FIND! from our list.
8157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8159      # If it failed, the variable was not from the command line. Ignore it,
8160      # but warn the user (except for BASH, which is always set by the calling BASH).
8161      if test "xFIND" != xBASH; then
8162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8163$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8164      fi
8165      # Try to locate tool using the code snippet
8166      for ac_prog in find
8167do
8168  # Extract the first word of "$ac_prog", so it can be a program name with args.
8169set dummy $ac_prog; ac_word=$2
8170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171$as_echo_n "checking for $ac_word... " >&6; }
8172if ${ac_cv_path_FIND+:} false; then :
8173  $as_echo_n "(cached) " >&6
8174else
8175  case $FIND in
8176  [\\/]* | ?:[\\/]*)
8177  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8178  ;;
8179  *)
8180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8181for as_dir in $PATH
8182do
8183  IFS=$as_save_IFS
8184  test -z "$as_dir" && as_dir=.
8185    for ac_exec_ext in '' $ac_executable_extensions; do
8186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8187    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8189    break 2
8190  fi
8191done
8192  done
8193IFS=$as_save_IFS
8194
8195  ;;
8196esac
8197fi
8198FIND=$ac_cv_path_FIND
8199if test -n "$FIND"; then
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8201$as_echo "$FIND" >&6; }
8202else
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204$as_echo "no" >&6; }
8205fi
8206
8207
8208  test -n "$FIND" && break
8209done
8210
8211    else
8212      # If it succeeded, then it was overridden by the user. We will use it
8213      # for the tool.
8214
8215      # First remove it from the list of overridden variables, so we can test
8216      # for unknown variables in the end.
8217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8218
8219      # Check if we try to supply an empty value
8220      if test "x$FIND" = x; then
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8222$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8224$as_echo_n "checking for FIND... " >&6; }
8225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8226$as_echo "disabled" >&6; }
8227      else
8228        # Check if the provided tool contains a complete path.
8229        tool_specified="$FIND"
8230        tool_basename="${tool_specified##*/}"
8231        if test "x$tool_basename" = "x$tool_specified"; then
8232          # A command without a complete path is provided, search $PATH.
8233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8234$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8235          # Extract the first word of "$tool_basename", so it can be a program name with args.
8236set dummy $tool_basename; ac_word=$2
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238$as_echo_n "checking for $ac_word... " >&6; }
8239if ${ac_cv_path_FIND+:} false; then :
8240  $as_echo_n "(cached) " >&6
8241else
8242  case $FIND in
8243  [\\/]* | ?:[\\/]*)
8244  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8245  ;;
8246  *)
8247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248for as_dir in $PATH
8249do
8250  IFS=$as_save_IFS
8251  test -z "$as_dir" && as_dir=.
8252    for ac_exec_ext in '' $ac_executable_extensions; do
8253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8254    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256    break 2
8257  fi
8258done
8259  done
8260IFS=$as_save_IFS
8261
8262  ;;
8263esac
8264fi
8265FIND=$ac_cv_path_FIND
8266if test -n "$FIND"; then
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8268$as_echo "$FIND" >&6; }
8269else
8270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271$as_echo "no" >&6; }
8272fi
8273
8274
8275          if test "x$FIND" = x; then
8276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8277          fi
8278        else
8279          # Otherwise we believe it is a complete path. Use it as it is.
8280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8281$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8283$as_echo_n "checking for FIND... " >&6; }
8284          if test ! -x "$tool_specified"; then
8285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8286$as_echo "not found" >&6; }
8287            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8288          fi
8289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8290$as_echo "$tool_specified" >&6; }
8291        fi
8292      fi
8293    fi
8294
8295  fi
8296
8297
8298
8299  if test "x$FIND" = x; then
8300    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8301  fi
8302
8303
8304
8305
8306
8307  # Publish this variable in the help.
8308
8309
8310  if [ -z "${HEAD+x}" ]; then
8311    # The variable is not set by user, try to locate tool using the code snippet
8312    for ac_prog in head
8313do
8314  # Extract the first word of "$ac_prog", so it can be a program name with args.
8315set dummy $ac_prog; ac_word=$2
8316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8317$as_echo_n "checking for $ac_word... " >&6; }
8318if ${ac_cv_path_HEAD+:} false; then :
8319  $as_echo_n "(cached) " >&6
8320else
8321  case $HEAD in
8322  [\\/]* | ?:[\\/]*)
8323  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8324  ;;
8325  *)
8326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8327for as_dir in $PATH
8328do
8329  IFS=$as_save_IFS
8330  test -z "$as_dir" && as_dir=.
8331    for ac_exec_ext in '' $ac_executable_extensions; do
8332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8333    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8335    break 2
8336  fi
8337done
8338  done
8339IFS=$as_save_IFS
8340
8341  ;;
8342esac
8343fi
8344HEAD=$ac_cv_path_HEAD
8345if test -n "$HEAD"; then
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8347$as_echo "$HEAD" >&6; }
8348else
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8350$as_echo "no" >&6; }
8351fi
8352
8353
8354  test -n "$HEAD" && break
8355done
8356
8357  else
8358    # The variable is set, but is it from the command line or the environment?
8359
8360    # Try to remove the string !HEAD! from our list.
8361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8363      # If it failed, the variable was not from the command line. Ignore it,
8364      # but warn the user (except for BASH, which is always set by the calling BASH).
8365      if test "xHEAD" != xBASH; then
8366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8367$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8368      fi
8369      # Try to locate tool using the code snippet
8370      for ac_prog in head
8371do
8372  # Extract the first word of "$ac_prog", so it can be a program name with args.
8373set dummy $ac_prog; ac_word=$2
8374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8375$as_echo_n "checking for $ac_word... " >&6; }
8376if ${ac_cv_path_HEAD+:} false; then :
8377  $as_echo_n "(cached) " >&6
8378else
8379  case $HEAD in
8380  [\\/]* | ?:[\\/]*)
8381  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8382  ;;
8383  *)
8384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385for as_dir in $PATH
8386do
8387  IFS=$as_save_IFS
8388  test -z "$as_dir" && as_dir=.
8389    for ac_exec_ext in '' $ac_executable_extensions; do
8390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8391    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8393    break 2
8394  fi
8395done
8396  done
8397IFS=$as_save_IFS
8398
8399  ;;
8400esac
8401fi
8402HEAD=$ac_cv_path_HEAD
8403if test -n "$HEAD"; then
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8405$as_echo "$HEAD" >&6; }
8406else
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408$as_echo "no" >&6; }
8409fi
8410
8411
8412  test -n "$HEAD" && break
8413done
8414
8415    else
8416      # If it succeeded, then it was overridden by the user. We will use it
8417      # for the tool.
8418
8419      # First remove it from the list of overridden variables, so we can test
8420      # for unknown variables in the end.
8421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8422
8423      # Check if we try to supply an empty value
8424      if test "x$HEAD" = x; then
8425        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8426$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8428$as_echo_n "checking for HEAD... " >&6; }
8429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8430$as_echo "disabled" >&6; }
8431      else
8432        # Check if the provided tool contains a complete path.
8433        tool_specified="$HEAD"
8434        tool_basename="${tool_specified##*/}"
8435        if test "x$tool_basename" = "x$tool_specified"; then
8436          # A command without a complete path is provided, search $PATH.
8437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8438$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8439          # Extract the first word of "$tool_basename", so it can be a program name with args.
8440set dummy $tool_basename; ac_word=$2
8441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8442$as_echo_n "checking for $ac_word... " >&6; }
8443if ${ac_cv_path_HEAD+:} false; then :
8444  $as_echo_n "(cached) " >&6
8445else
8446  case $HEAD in
8447  [\\/]* | ?:[\\/]*)
8448  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8449  ;;
8450  *)
8451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8452for as_dir in $PATH
8453do
8454  IFS=$as_save_IFS
8455  test -z "$as_dir" && as_dir=.
8456    for ac_exec_ext in '' $ac_executable_extensions; do
8457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8458    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8460    break 2
8461  fi
8462done
8463  done
8464IFS=$as_save_IFS
8465
8466  ;;
8467esac
8468fi
8469HEAD=$ac_cv_path_HEAD
8470if test -n "$HEAD"; then
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8472$as_echo "$HEAD" >&6; }
8473else
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8475$as_echo "no" >&6; }
8476fi
8477
8478
8479          if test "x$HEAD" = x; then
8480            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8481          fi
8482        else
8483          # Otherwise we believe it is a complete path. Use it as it is.
8484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8485$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8486          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8487$as_echo_n "checking for HEAD... " >&6; }
8488          if test ! -x "$tool_specified"; then
8489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8490$as_echo "not found" >&6; }
8491            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8492          fi
8493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8494$as_echo "$tool_specified" >&6; }
8495        fi
8496      fi
8497    fi
8498
8499  fi
8500
8501
8502
8503  if test "x$HEAD" = x; then
8504    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8505  fi
8506
8507
8508
8509
8510
8511  # Publish this variable in the help.
8512
8513
8514  if [ -z "${GUNZIP+x}" ]; then
8515    # The variable is not set by user, try to locate tool using the code snippet
8516    for ac_prog in gunzip
8517do
8518  # Extract the first word of "$ac_prog", so it can be a program name with args.
8519set dummy $ac_prog; ac_word=$2
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8521$as_echo_n "checking for $ac_word... " >&6; }
8522if ${ac_cv_path_GUNZIP+:} false; then :
8523  $as_echo_n "(cached) " >&6
8524else
8525  case $GUNZIP in
8526  [\\/]* | ?:[\\/]*)
8527  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8528  ;;
8529  *)
8530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8531for as_dir in $PATH
8532do
8533  IFS=$as_save_IFS
8534  test -z "$as_dir" && as_dir=.
8535    for ac_exec_ext in '' $ac_executable_extensions; do
8536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8537    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8539    break 2
8540  fi
8541done
8542  done
8543IFS=$as_save_IFS
8544
8545  ;;
8546esac
8547fi
8548GUNZIP=$ac_cv_path_GUNZIP
8549if test -n "$GUNZIP"; then
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8551$as_echo "$GUNZIP" >&6; }
8552else
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554$as_echo "no" >&6; }
8555fi
8556
8557
8558  test -n "$GUNZIP" && break
8559done
8560
8561  else
8562    # The variable is set, but is it from the command line or the environment?
8563
8564    # Try to remove the string !GUNZIP! from our list.
8565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8567      # If it failed, the variable was not from the command line. Ignore it,
8568      # but warn the user (except for BASH, which is always set by the calling BASH).
8569      if test "xGUNZIP" != xBASH; then
8570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8571$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8572      fi
8573      # Try to locate tool using the code snippet
8574      for ac_prog in gunzip
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_GUNZIP+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $GUNZIP in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606GUNZIP=$ac_cv_path_GUNZIP
8607if test -n "$GUNZIP"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8609$as_echo "$GUNZIP" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$GUNZIP" && break
8617done
8618
8619    else
8620      # If it succeeded, then it was overridden by the user. We will use it
8621      # for the tool.
8622
8623      # First remove it from the list of overridden variables, so we can test
8624      # for unknown variables in the end.
8625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8626
8627      # Check if we try to supply an empty value
8628      if test "x$GUNZIP" = x; then
8629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8630$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8632$as_echo_n "checking for GUNZIP... " >&6; }
8633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8634$as_echo "disabled" >&6; }
8635      else
8636        # Check if the provided tool contains a complete path.
8637        tool_specified="$GUNZIP"
8638        tool_basename="${tool_specified##*/}"
8639        if test "x$tool_basename" = "x$tool_specified"; then
8640          # A command without a complete path is provided, search $PATH.
8641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8642$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8643          # Extract the first word of "$tool_basename", so it can be a program name with args.
8644set dummy $tool_basename; ac_word=$2
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8646$as_echo_n "checking for $ac_word... " >&6; }
8647if ${ac_cv_path_GUNZIP+:} false; then :
8648  $as_echo_n "(cached) " >&6
8649else
8650  case $GUNZIP in
8651  [\\/]* | ?:[\\/]*)
8652  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8653  ;;
8654  *)
8655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656for as_dir in $PATH
8657do
8658  IFS=$as_save_IFS
8659  test -z "$as_dir" && as_dir=.
8660    for ac_exec_ext in '' $ac_executable_extensions; do
8661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8662    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664    break 2
8665  fi
8666done
8667  done
8668IFS=$as_save_IFS
8669
8670  ;;
8671esac
8672fi
8673GUNZIP=$ac_cv_path_GUNZIP
8674if test -n "$GUNZIP"; then
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8676$as_echo "$GUNZIP" >&6; }
8677else
8678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8679$as_echo "no" >&6; }
8680fi
8681
8682
8683          if test "x$GUNZIP" = x; then
8684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8685          fi
8686        else
8687          # Otherwise we believe it is a complete path. Use it as it is.
8688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8689$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8691$as_echo_n "checking for GUNZIP... " >&6; }
8692          if test ! -x "$tool_specified"; then
8693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8694$as_echo "not found" >&6; }
8695            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8696          fi
8697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8698$as_echo "$tool_specified" >&6; }
8699        fi
8700      fi
8701    fi
8702
8703  fi
8704
8705
8706
8707  if test "x$GUNZIP" = x; then
8708    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8709  fi
8710
8711
8712
8713
8714
8715  # Publish this variable in the help.
8716
8717
8718  if [ -z "${GZIP+x}" ]; then
8719    # The variable is not set by user, try to locate tool using the code snippet
8720    for ac_prog in pigz gzip
8721do
8722  # Extract the first word of "$ac_prog", so it can be a program name with args.
8723set dummy $ac_prog; ac_word=$2
8724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8725$as_echo_n "checking for $ac_word... " >&6; }
8726if ${ac_cv_path_GZIP+:} false; then :
8727  $as_echo_n "(cached) " >&6
8728else
8729  case $GZIP in
8730  [\\/]* | ?:[\\/]*)
8731  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8732  ;;
8733  *)
8734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8735for as_dir in $PATH
8736do
8737  IFS=$as_save_IFS
8738  test -z "$as_dir" && as_dir=.
8739    for ac_exec_ext in '' $ac_executable_extensions; do
8740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8741    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8743    break 2
8744  fi
8745done
8746  done
8747IFS=$as_save_IFS
8748
8749  ;;
8750esac
8751fi
8752GZIP=$ac_cv_path_GZIP
8753if test -n "$GZIP"; then
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8755$as_echo "$GZIP" >&6; }
8756else
8757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8758$as_echo "no" >&6; }
8759fi
8760
8761
8762  test -n "$GZIP" && break
8763done
8764
8765  else
8766    # The variable is set, but is it from the command line or the environment?
8767
8768    # Try to remove the string !GZIP! from our list.
8769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8771      # If it failed, the variable was not from the command line. Ignore it,
8772      # but warn the user (except for BASH, which is always set by the calling BASH).
8773      if test "xGZIP" != xBASH; then
8774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8775$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8776      fi
8777      # Try to locate tool using the code snippet
8778      for ac_prog in pigz gzip
8779do
8780  # Extract the first word of "$ac_prog", so it can be a program name with args.
8781set dummy $ac_prog; ac_word=$2
8782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783$as_echo_n "checking for $ac_word... " >&6; }
8784if ${ac_cv_path_GZIP+:} false; then :
8785  $as_echo_n "(cached) " >&6
8786else
8787  case $GZIP in
8788  [\\/]* | ?:[\\/]*)
8789  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8790  ;;
8791  *)
8792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8793for as_dir in $PATH
8794do
8795  IFS=$as_save_IFS
8796  test -z "$as_dir" && as_dir=.
8797    for ac_exec_ext in '' $ac_executable_extensions; do
8798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8799    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8801    break 2
8802  fi
8803done
8804  done
8805IFS=$as_save_IFS
8806
8807  ;;
8808esac
8809fi
8810GZIP=$ac_cv_path_GZIP
8811if test -n "$GZIP"; then
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8813$as_echo "$GZIP" >&6; }
8814else
8815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
8817fi
8818
8819
8820  test -n "$GZIP" && break
8821done
8822
8823    else
8824      # If it succeeded, then it was overridden by the user. We will use it
8825      # for the tool.
8826
8827      # First remove it from the list of overridden variables, so we can test
8828      # for unknown variables in the end.
8829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8830
8831      # Check if we try to supply an empty value
8832      if test "x$GZIP" = x; then
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8834$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8836$as_echo_n "checking for GZIP... " >&6; }
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8838$as_echo "disabled" >&6; }
8839      else
8840        # Check if the provided tool contains a complete path.
8841        tool_specified="$GZIP"
8842        tool_basename="${tool_specified##*/}"
8843        if test "x$tool_basename" = "x$tool_specified"; then
8844          # A command without a complete path is provided, search $PATH.
8845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8846$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8847          # Extract the first word of "$tool_basename", so it can be a program name with args.
8848set dummy $tool_basename; ac_word=$2
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8850$as_echo_n "checking for $ac_word... " >&6; }
8851if ${ac_cv_path_GZIP+:} false; then :
8852  $as_echo_n "(cached) " >&6
8853else
8854  case $GZIP in
8855  [\\/]* | ?:[\\/]*)
8856  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8857  ;;
8858  *)
8859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8860for as_dir in $PATH
8861do
8862  IFS=$as_save_IFS
8863  test -z "$as_dir" && as_dir=.
8864    for ac_exec_ext in '' $ac_executable_extensions; do
8865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8866    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8868    break 2
8869  fi
8870done
8871  done
8872IFS=$as_save_IFS
8873
8874  ;;
8875esac
8876fi
8877GZIP=$ac_cv_path_GZIP
8878if test -n "$GZIP"; then
8879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8880$as_echo "$GZIP" >&6; }
8881else
8882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883$as_echo "no" >&6; }
8884fi
8885
8886
8887          if test "x$GZIP" = x; then
8888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8889          fi
8890        else
8891          # Otherwise we believe it is a complete path. Use it as it is.
8892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8893$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8895$as_echo_n "checking for GZIP... " >&6; }
8896          if test ! -x "$tool_specified"; then
8897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8898$as_echo "not found" >&6; }
8899            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8900          fi
8901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8902$as_echo "$tool_specified" >&6; }
8903        fi
8904      fi
8905    fi
8906
8907  fi
8908
8909
8910
8911  if test "x$GZIP" = x; then
8912    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8913  fi
8914
8915
8916
8917
8918
8919  # Publish this variable in the help.
8920
8921
8922  if [ -z "${LN+x}" ]; then
8923    # The variable is not set by user, try to locate tool using the code snippet
8924    for ac_prog in ln
8925do
8926  # Extract the first word of "$ac_prog", so it can be a program name with args.
8927set dummy $ac_prog; ac_word=$2
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8929$as_echo_n "checking for $ac_word... " >&6; }
8930if ${ac_cv_path_LN+:} false; then :
8931  $as_echo_n "(cached) " >&6
8932else
8933  case $LN in
8934  [\\/]* | ?:[\\/]*)
8935  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8936  ;;
8937  *)
8938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8939for as_dir in $PATH
8940do
8941  IFS=$as_save_IFS
8942  test -z "$as_dir" && as_dir=.
8943    for ac_exec_ext in '' $ac_executable_extensions; do
8944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8945    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8947    break 2
8948  fi
8949done
8950  done
8951IFS=$as_save_IFS
8952
8953  ;;
8954esac
8955fi
8956LN=$ac_cv_path_LN
8957if test -n "$LN"; then
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8959$as_echo "$LN" >&6; }
8960else
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
8963fi
8964
8965
8966  test -n "$LN" && break
8967done
8968
8969  else
8970    # The variable is set, but is it from the command line or the environment?
8971
8972    # Try to remove the string !LN! from our list.
8973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8975      # If it failed, the variable was not from the command line. Ignore it,
8976      # but warn the user (except for BASH, which is always set by the calling BASH).
8977      if test "xLN" != xBASH; then
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8979$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8980      fi
8981      # Try to locate tool using the code snippet
8982      for ac_prog in ln
8983do
8984  # Extract the first word of "$ac_prog", so it can be a program name with args.
8985set dummy $ac_prog; ac_word=$2
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987$as_echo_n "checking for $ac_word... " >&6; }
8988if ${ac_cv_path_LN+:} false; then :
8989  $as_echo_n "(cached) " >&6
8990else
8991  case $LN in
8992  [\\/]* | ?:[\\/]*)
8993  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8994  ;;
8995  *)
8996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997for as_dir in $PATH
8998do
8999  IFS=$as_save_IFS
9000  test -z "$as_dir" && as_dir=.
9001    for ac_exec_ext in '' $ac_executable_extensions; do
9002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005    break 2
9006  fi
9007done
9008  done
9009IFS=$as_save_IFS
9010
9011  ;;
9012esac
9013fi
9014LN=$ac_cv_path_LN
9015if test -n "$LN"; then
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9017$as_echo "$LN" >&6; }
9018else
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020$as_echo "no" >&6; }
9021fi
9022
9023
9024  test -n "$LN" && break
9025done
9026
9027    else
9028      # If it succeeded, then it was overridden by the user. We will use it
9029      # for the tool.
9030
9031      # First remove it from the list of overridden variables, so we can test
9032      # for unknown variables in the end.
9033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9034
9035      # Check if we try to supply an empty value
9036      if test "x$LN" = x; then
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9038$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9040$as_echo_n "checking for LN... " >&6; }
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9042$as_echo "disabled" >&6; }
9043      else
9044        # Check if the provided tool contains a complete path.
9045        tool_specified="$LN"
9046        tool_basename="${tool_specified##*/}"
9047        if test "x$tool_basename" = "x$tool_specified"; then
9048          # A command without a complete path is provided, search $PATH.
9049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9050$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9051          # Extract the first word of "$tool_basename", so it can be a program name with args.
9052set dummy $tool_basename; ac_word=$2
9053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9054$as_echo_n "checking for $ac_word... " >&6; }
9055if ${ac_cv_path_LN+:} false; then :
9056  $as_echo_n "(cached) " >&6
9057else
9058  case $LN in
9059  [\\/]* | ?:[\\/]*)
9060  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9061  ;;
9062  *)
9063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9064for as_dir in $PATH
9065do
9066  IFS=$as_save_IFS
9067  test -z "$as_dir" && as_dir=.
9068    for ac_exec_ext in '' $ac_executable_extensions; do
9069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9070    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9072    break 2
9073  fi
9074done
9075  done
9076IFS=$as_save_IFS
9077
9078  ;;
9079esac
9080fi
9081LN=$ac_cv_path_LN
9082if test -n "$LN"; then
9083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9084$as_echo "$LN" >&6; }
9085else
9086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9087$as_echo "no" >&6; }
9088fi
9089
9090
9091          if test "x$LN" = x; then
9092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9093          fi
9094        else
9095          # Otherwise we believe it is a complete path. Use it as it is.
9096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9097$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9099$as_echo_n "checking for LN... " >&6; }
9100          if test ! -x "$tool_specified"; then
9101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9102$as_echo "not found" >&6; }
9103            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9104          fi
9105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9106$as_echo "$tool_specified" >&6; }
9107        fi
9108      fi
9109    fi
9110
9111  fi
9112
9113
9114
9115  if test "x$LN" = x; then
9116    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9117  fi
9118
9119
9120
9121
9122
9123  # Publish this variable in the help.
9124
9125
9126  if [ -z "${LS+x}" ]; then
9127    # The variable is not set by user, try to locate tool using the code snippet
9128    for ac_prog in ls
9129do
9130  # Extract the first word of "$ac_prog", so it can be a program name with args.
9131set dummy $ac_prog; ac_word=$2
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9133$as_echo_n "checking for $ac_word... " >&6; }
9134if ${ac_cv_path_LS+:} false; then :
9135  $as_echo_n "(cached) " >&6
9136else
9137  case $LS in
9138  [\\/]* | ?:[\\/]*)
9139  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9140  ;;
9141  *)
9142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143for as_dir in $PATH
9144do
9145  IFS=$as_save_IFS
9146  test -z "$as_dir" && as_dir=.
9147    for ac_exec_ext in '' $ac_executable_extensions; do
9148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9149    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9151    break 2
9152  fi
9153done
9154  done
9155IFS=$as_save_IFS
9156
9157  ;;
9158esac
9159fi
9160LS=$ac_cv_path_LS
9161if test -n "$LS"; then
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9163$as_echo "$LS" >&6; }
9164else
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166$as_echo "no" >&6; }
9167fi
9168
9169
9170  test -n "$LS" && break
9171done
9172
9173  else
9174    # The variable is set, but is it from the command line or the environment?
9175
9176    # Try to remove the string !LS! from our list.
9177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9179      # If it failed, the variable was not from the command line. Ignore it,
9180      # but warn the user (except for BASH, which is always set by the calling BASH).
9181      if test "xLS" != xBASH; then
9182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9183$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9184      fi
9185      # Try to locate tool using the code snippet
9186      for ac_prog in ls
9187do
9188  # Extract the first word of "$ac_prog", so it can be a program name with args.
9189set dummy $ac_prog; ac_word=$2
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9191$as_echo_n "checking for $ac_word... " >&6; }
9192if ${ac_cv_path_LS+:} false; then :
9193  $as_echo_n "(cached) " >&6
9194else
9195  case $LS in
9196  [\\/]* | ?:[\\/]*)
9197  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9198  ;;
9199  *)
9200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9201for as_dir in $PATH
9202do
9203  IFS=$as_save_IFS
9204  test -z "$as_dir" && as_dir=.
9205    for ac_exec_ext in '' $ac_executable_extensions; do
9206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9207    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9209    break 2
9210  fi
9211done
9212  done
9213IFS=$as_save_IFS
9214
9215  ;;
9216esac
9217fi
9218LS=$ac_cv_path_LS
9219if test -n "$LS"; then
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9221$as_echo "$LS" >&6; }
9222else
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9224$as_echo "no" >&6; }
9225fi
9226
9227
9228  test -n "$LS" && break
9229done
9230
9231    else
9232      # If it succeeded, then it was overridden by the user. We will use it
9233      # for the tool.
9234
9235      # First remove it from the list of overridden variables, so we can test
9236      # for unknown variables in the end.
9237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9238
9239      # Check if we try to supply an empty value
9240      if test "x$LS" = x; then
9241        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9242$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9244$as_echo_n "checking for LS... " >&6; }
9245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9246$as_echo "disabled" >&6; }
9247      else
9248        # Check if the provided tool contains a complete path.
9249        tool_specified="$LS"
9250        tool_basename="${tool_specified##*/}"
9251        if test "x$tool_basename" = "x$tool_specified"; then
9252          # A command without a complete path is provided, search $PATH.
9253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9254$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9255          # Extract the first word of "$tool_basename", so it can be a program name with args.
9256set dummy $tool_basename; ac_word=$2
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9258$as_echo_n "checking for $ac_word... " >&6; }
9259if ${ac_cv_path_LS+:} false; then :
9260  $as_echo_n "(cached) " >&6
9261else
9262  case $LS in
9263  [\\/]* | ?:[\\/]*)
9264  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9265  ;;
9266  *)
9267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9268for as_dir in $PATH
9269do
9270  IFS=$as_save_IFS
9271  test -z "$as_dir" && as_dir=.
9272    for ac_exec_ext in '' $ac_executable_extensions; do
9273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9274    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9276    break 2
9277  fi
9278done
9279  done
9280IFS=$as_save_IFS
9281
9282  ;;
9283esac
9284fi
9285LS=$ac_cv_path_LS
9286if test -n "$LS"; then
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9288$as_echo "$LS" >&6; }
9289else
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
9292fi
9293
9294
9295          if test "x$LS" = x; then
9296            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9297          fi
9298        else
9299          # Otherwise we believe it is a complete path. Use it as it is.
9300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9301$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9302          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9303$as_echo_n "checking for LS... " >&6; }
9304          if test ! -x "$tool_specified"; then
9305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9306$as_echo "not found" >&6; }
9307            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9308          fi
9309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9310$as_echo "$tool_specified" >&6; }
9311        fi
9312      fi
9313    fi
9314
9315  fi
9316
9317
9318
9319  if test "x$LS" = x; then
9320    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9321  fi
9322
9323
9324
9325
9326
9327  # Publish this variable in the help.
9328
9329
9330  if [ -z "${MKDIR+x}" ]; then
9331    # The variable is not set by user, try to locate tool using the code snippet
9332    for ac_prog in mkdir
9333do
9334  # Extract the first word of "$ac_prog", so it can be a program name with args.
9335set dummy $ac_prog; ac_word=$2
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9337$as_echo_n "checking for $ac_word... " >&6; }
9338if ${ac_cv_path_MKDIR+:} false; then :
9339  $as_echo_n "(cached) " >&6
9340else
9341  case $MKDIR in
9342  [\\/]* | ?:[\\/]*)
9343  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9344  ;;
9345  *)
9346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9347for as_dir in $PATH
9348do
9349  IFS=$as_save_IFS
9350  test -z "$as_dir" && as_dir=.
9351    for ac_exec_ext in '' $ac_executable_extensions; do
9352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9353    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9355    break 2
9356  fi
9357done
9358  done
9359IFS=$as_save_IFS
9360
9361  ;;
9362esac
9363fi
9364MKDIR=$ac_cv_path_MKDIR
9365if test -n "$MKDIR"; then
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9367$as_echo "$MKDIR" >&6; }
9368else
9369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
9371fi
9372
9373
9374  test -n "$MKDIR" && break
9375done
9376
9377  else
9378    # The variable is set, but is it from the command line or the environment?
9379
9380    # Try to remove the string !MKDIR! from our list.
9381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9383      # If it failed, the variable was not from the command line. Ignore it,
9384      # but warn the user (except for BASH, which is always set by the calling BASH).
9385      if test "xMKDIR" != xBASH; then
9386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9387$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9388      fi
9389      # Try to locate tool using the code snippet
9390      for ac_prog in mkdir
9391do
9392  # Extract the first word of "$ac_prog", so it can be a program name with args.
9393set dummy $ac_prog; ac_word=$2
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395$as_echo_n "checking for $ac_word... " >&6; }
9396if ${ac_cv_path_MKDIR+:} false; then :
9397  $as_echo_n "(cached) " >&6
9398else
9399  case $MKDIR in
9400  [\\/]* | ?:[\\/]*)
9401  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9402  ;;
9403  *)
9404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9405for as_dir in $PATH
9406do
9407  IFS=$as_save_IFS
9408  test -z "$as_dir" && as_dir=.
9409    for ac_exec_ext in '' $ac_executable_extensions; do
9410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9411    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9413    break 2
9414  fi
9415done
9416  done
9417IFS=$as_save_IFS
9418
9419  ;;
9420esac
9421fi
9422MKDIR=$ac_cv_path_MKDIR
9423if test -n "$MKDIR"; then
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9425$as_echo "$MKDIR" >&6; }
9426else
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
9429fi
9430
9431
9432  test -n "$MKDIR" && break
9433done
9434
9435    else
9436      # If it succeeded, then it was overridden by the user. We will use it
9437      # for the tool.
9438
9439      # First remove it from the list of overridden variables, so we can test
9440      # for unknown variables in the end.
9441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9442
9443      # Check if we try to supply an empty value
9444      if test "x$MKDIR" = x; then
9445        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9446$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9448$as_echo_n "checking for MKDIR... " >&6; }
9449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9450$as_echo "disabled" >&6; }
9451      else
9452        # Check if the provided tool contains a complete path.
9453        tool_specified="$MKDIR"
9454        tool_basename="${tool_specified##*/}"
9455        if test "x$tool_basename" = "x$tool_specified"; then
9456          # A command without a complete path is provided, search $PATH.
9457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9458$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9459          # Extract the first word of "$tool_basename", so it can be a program name with args.
9460set dummy $tool_basename; ac_word=$2
9461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9462$as_echo_n "checking for $ac_word... " >&6; }
9463if ${ac_cv_path_MKDIR+:} false; then :
9464  $as_echo_n "(cached) " >&6
9465else
9466  case $MKDIR in
9467  [\\/]* | ?:[\\/]*)
9468  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9469  ;;
9470  *)
9471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9472for as_dir in $PATH
9473do
9474  IFS=$as_save_IFS
9475  test -z "$as_dir" && as_dir=.
9476    for ac_exec_ext in '' $ac_executable_extensions; do
9477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9478    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9480    break 2
9481  fi
9482done
9483  done
9484IFS=$as_save_IFS
9485
9486  ;;
9487esac
9488fi
9489MKDIR=$ac_cv_path_MKDIR
9490if test -n "$MKDIR"; then
9491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9492$as_echo "$MKDIR" >&6; }
9493else
9494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
9496fi
9497
9498
9499          if test "x$MKDIR" = x; then
9500            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9501          fi
9502        else
9503          # Otherwise we believe it is a complete path. Use it as it is.
9504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9505$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9507$as_echo_n "checking for MKDIR... " >&6; }
9508          if test ! -x "$tool_specified"; then
9509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9510$as_echo "not found" >&6; }
9511            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9512          fi
9513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9514$as_echo "$tool_specified" >&6; }
9515        fi
9516      fi
9517    fi
9518
9519  fi
9520
9521
9522
9523  if test "x$MKDIR" = x; then
9524    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9525  fi
9526
9527
9528
9529
9530
9531  # Publish this variable in the help.
9532
9533
9534  if [ -z "${MKTEMP+x}" ]; then
9535    # The variable is not set by user, try to locate tool using the code snippet
9536    for ac_prog in mktemp
9537do
9538  # Extract the first word of "$ac_prog", so it can be a program name with args.
9539set dummy $ac_prog; ac_word=$2
9540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9541$as_echo_n "checking for $ac_word... " >&6; }
9542if ${ac_cv_path_MKTEMP+:} false; then :
9543  $as_echo_n "(cached) " >&6
9544else
9545  case $MKTEMP in
9546  [\\/]* | ?:[\\/]*)
9547  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9548  ;;
9549  *)
9550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9551for as_dir in $PATH
9552do
9553  IFS=$as_save_IFS
9554  test -z "$as_dir" && as_dir=.
9555    for ac_exec_ext in '' $ac_executable_extensions; do
9556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9557    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9559    break 2
9560  fi
9561done
9562  done
9563IFS=$as_save_IFS
9564
9565  ;;
9566esac
9567fi
9568MKTEMP=$ac_cv_path_MKTEMP
9569if test -n "$MKTEMP"; then
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9571$as_echo "$MKTEMP" >&6; }
9572else
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9574$as_echo "no" >&6; }
9575fi
9576
9577
9578  test -n "$MKTEMP" && break
9579done
9580
9581  else
9582    # The variable is set, but is it from the command line or the environment?
9583
9584    # Try to remove the string !MKTEMP! from our list.
9585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9587      # If it failed, the variable was not from the command line. Ignore it,
9588      # but warn the user (except for BASH, which is always set by the calling BASH).
9589      if test "xMKTEMP" != xBASH; then
9590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9591$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9592      fi
9593      # Try to locate tool using the code snippet
9594      for ac_prog in mktemp
9595do
9596  # Extract the first word of "$ac_prog", so it can be a program name with args.
9597set dummy $ac_prog; ac_word=$2
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9599$as_echo_n "checking for $ac_word... " >&6; }
9600if ${ac_cv_path_MKTEMP+:} false; then :
9601  $as_echo_n "(cached) " >&6
9602else
9603  case $MKTEMP in
9604  [\\/]* | ?:[\\/]*)
9605  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9606  ;;
9607  *)
9608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9609for as_dir in $PATH
9610do
9611  IFS=$as_save_IFS
9612  test -z "$as_dir" && as_dir=.
9613    for ac_exec_ext in '' $ac_executable_extensions; do
9614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9615    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9617    break 2
9618  fi
9619done
9620  done
9621IFS=$as_save_IFS
9622
9623  ;;
9624esac
9625fi
9626MKTEMP=$ac_cv_path_MKTEMP
9627if test -n "$MKTEMP"; then
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9629$as_echo "$MKTEMP" >&6; }
9630else
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632$as_echo "no" >&6; }
9633fi
9634
9635
9636  test -n "$MKTEMP" && break
9637done
9638
9639    else
9640      # If it succeeded, then it was overridden by the user. We will use it
9641      # for the tool.
9642
9643      # First remove it from the list of overridden variables, so we can test
9644      # for unknown variables in the end.
9645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9646
9647      # Check if we try to supply an empty value
9648      if test "x$MKTEMP" = x; then
9649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9650$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9652$as_echo_n "checking for MKTEMP... " >&6; }
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9654$as_echo "disabled" >&6; }
9655      else
9656        # Check if the provided tool contains a complete path.
9657        tool_specified="$MKTEMP"
9658        tool_basename="${tool_specified##*/}"
9659        if test "x$tool_basename" = "x$tool_specified"; then
9660          # A command without a complete path is provided, search $PATH.
9661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9662$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9663          # Extract the first word of "$tool_basename", so it can be a program name with args.
9664set dummy $tool_basename; ac_word=$2
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9666$as_echo_n "checking for $ac_word... " >&6; }
9667if ${ac_cv_path_MKTEMP+:} false; then :
9668  $as_echo_n "(cached) " >&6
9669else
9670  case $MKTEMP in
9671  [\\/]* | ?:[\\/]*)
9672  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9673  ;;
9674  *)
9675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9676for as_dir in $PATH
9677do
9678  IFS=$as_save_IFS
9679  test -z "$as_dir" && as_dir=.
9680    for ac_exec_ext in '' $ac_executable_extensions; do
9681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9682    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9684    break 2
9685  fi
9686done
9687  done
9688IFS=$as_save_IFS
9689
9690  ;;
9691esac
9692fi
9693MKTEMP=$ac_cv_path_MKTEMP
9694if test -n "$MKTEMP"; then
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9696$as_echo "$MKTEMP" >&6; }
9697else
9698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699$as_echo "no" >&6; }
9700fi
9701
9702
9703          if test "x$MKTEMP" = x; then
9704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9705          fi
9706        else
9707          # Otherwise we believe it is a complete path. Use it as it is.
9708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9709$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9711$as_echo_n "checking for MKTEMP... " >&6; }
9712          if test ! -x "$tool_specified"; then
9713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9714$as_echo "not found" >&6; }
9715            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9716          fi
9717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9718$as_echo "$tool_specified" >&6; }
9719        fi
9720      fi
9721    fi
9722
9723  fi
9724
9725
9726
9727  if test "x$MKTEMP" = x; then
9728    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9729  fi
9730
9731
9732
9733
9734
9735  # Publish this variable in the help.
9736
9737
9738  if [ -z "${MV+x}" ]; then
9739    # The variable is not set by user, try to locate tool using the code snippet
9740    for ac_prog in mv
9741do
9742  # Extract the first word of "$ac_prog", so it can be a program name with args.
9743set dummy $ac_prog; ac_word=$2
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9745$as_echo_n "checking for $ac_word... " >&6; }
9746if ${ac_cv_path_MV+:} false; then :
9747  $as_echo_n "(cached) " >&6
9748else
9749  case $MV in
9750  [\\/]* | ?:[\\/]*)
9751  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9752  ;;
9753  *)
9754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9755for as_dir in $PATH
9756do
9757  IFS=$as_save_IFS
9758  test -z "$as_dir" && as_dir=.
9759    for ac_exec_ext in '' $ac_executable_extensions; do
9760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9761    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9763    break 2
9764  fi
9765done
9766  done
9767IFS=$as_save_IFS
9768
9769  ;;
9770esac
9771fi
9772MV=$ac_cv_path_MV
9773if test -n "$MV"; then
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9775$as_echo "$MV" >&6; }
9776else
9777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779fi
9780
9781
9782  test -n "$MV" && break
9783done
9784
9785  else
9786    # The variable is set, but is it from the command line or the environment?
9787
9788    # Try to remove the string !MV! from our list.
9789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9791      # If it failed, the variable was not from the command line. Ignore it,
9792      # but warn the user (except for BASH, which is always set by the calling BASH).
9793      if test "xMV" != xBASH; then
9794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9795$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9796      fi
9797      # Try to locate tool using the code snippet
9798      for ac_prog in mv
9799do
9800  # Extract the first word of "$ac_prog", so it can be a program name with args.
9801set dummy $ac_prog; ac_word=$2
9802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9803$as_echo_n "checking for $ac_word... " >&6; }
9804if ${ac_cv_path_MV+:} false; then :
9805  $as_echo_n "(cached) " >&6
9806else
9807  case $MV in
9808  [\\/]* | ?:[\\/]*)
9809  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9810  ;;
9811  *)
9812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9813for as_dir in $PATH
9814do
9815  IFS=$as_save_IFS
9816  test -z "$as_dir" && as_dir=.
9817    for ac_exec_ext in '' $ac_executable_extensions; do
9818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9819    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9821    break 2
9822  fi
9823done
9824  done
9825IFS=$as_save_IFS
9826
9827  ;;
9828esac
9829fi
9830MV=$ac_cv_path_MV
9831if test -n "$MV"; then
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9833$as_echo "$MV" >&6; }
9834else
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836$as_echo "no" >&6; }
9837fi
9838
9839
9840  test -n "$MV" && break
9841done
9842
9843    else
9844      # If it succeeded, then it was overridden by the user. We will use it
9845      # for the tool.
9846
9847      # First remove it from the list of overridden variables, so we can test
9848      # for unknown variables in the end.
9849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9850
9851      # Check if we try to supply an empty value
9852      if test "x$MV" = x; then
9853        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9854$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9856$as_echo_n "checking for MV... " >&6; }
9857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9858$as_echo "disabled" >&6; }
9859      else
9860        # Check if the provided tool contains a complete path.
9861        tool_specified="$MV"
9862        tool_basename="${tool_specified##*/}"
9863        if test "x$tool_basename" = "x$tool_specified"; then
9864          # A command without a complete path is provided, search $PATH.
9865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9866$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9867          # Extract the first word of "$tool_basename", so it can be a program name with args.
9868set dummy $tool_basename; ac_word=$2
9869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9870$as_echo_n "checking for $ac_word... " >&6; }
9871if ${ac_cv_path_MV+:} false; then :
9872  $as_echo_n "(cached) " >&6
9873else
9874  case $MV in
9875  [\\/]* | ?:[\\/]*)
9876  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9877  ;;
9878  *)
9879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9880for as_dir in $PATH
9881do
9882  IFS=$as_save_IFS
9883  test -z "$as_dir" && as_dir=.
9884    for ac_exec_ext in '' $ac_executable_extensions; do
9885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9886    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9888    break 2
9889  fi
9890done
9891  done
9892IFS=$as_save_IFS
9893
9894  ;;
9895esac
9896fi
9897MV=$ac_cv_path_MV
9898if test -n "$MV"; then
9899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9900$as_echo "$MV" >&6; }
9901else
9902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9903$as_echo "no" >&6; }
9904fi
9905
9906
9907          if test "x$MV" = x; then
9908            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9909          fi
9910        else
9911          # Otherwise we believe it is a complete path. Use it as it is.
9912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9913$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9914          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9915$as_echo_n "checking for MV... " >&6; }
9916          if test ! -x "$tool_specified"; then
9917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9918$as_echo "not found" >&6; }
9919            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9920          fi
9921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9922$as_echo "$tool_specified" >&6; }
9923        fi
9924      fi
9925    fi
9926
9927  fi
9928
9929
9930
9931  if test "x$MV" = x; then
9932    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9933  fi
9934
9935
9936
9937
9938
9939  # Publish this variable in the help.
9940
9941
9942  if [ -z "${NAWK+x}" ]; then
9943    # The variable is not set by user, try to locate tool using the code snippet
9944    for ac_prog in nawk gawk awk
9945do
9946  # Extract the first word of "$ac_prog", so it can be a program name with args.
9947set dummy $ac_prog; ac_word=$2
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949$as_echo_n "checking for $ac_word... " >&6; }
9950if ${ac_cv_path_NAWK+:} false; then :
9951  $as_echo_n "(cached) " >&6
9952else
9953  case $NAWK in
9954  [\\/]* | ?:[\\/]*)
9955  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9956  ;;
9957  *)
9958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961  IFS=$as_save_IFS
9962  test -z "$as_dir" && as_dir=.
9963    for ac_exec_ext in '' $ac_executable_extensions; do
9964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967    break 2
9968  fi
9969done
9970  done
9971IFS=$as_save_IFS
9972
9973  ;;
9974esac
9975fi
9976NAWK=$ac_cv_path_NAWK
9977if test -n "$NAWK"; then
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9979$as_echo "$NAWK" >&6; }
9980else
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983fi
9984
9985
9986  test -n "$NAWK" && break
9987done
9988
9989  else
9990    # The variable is set, but is it from the command line or the environment?
9991
9992    # Try to remove the string !NAWK! from our list.
9993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9995      # If it failed, the variable was not from the command line. Ignore it,
9996      # but warn the user (except for BASH, which is always set by the calling BASH).
9997      if test "xNAWK" != xBASH; then
9998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9999$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
10000      fi
10001      # Try to locate tool using the code snippet
10002      for ac_prog in nawk gawk awk
10003do
10004  # Extract the first word of "$ac_prog", so it can be a program name with args.
10005set dummy $ac_prog; ac_word=$2
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10007$as_echo_n "checking for $ac_word... " >&6; }
10008if ${ac_cv_path_NAWK+:} false; then :
10009  $as_echo_n "(cached) " >&6
10010else
10011  case $NAWK in
10012  [\\/]* | ?:[\\/]*)
10013  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10014  ;;
10015  *)
10016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10017for as_dir in $PATH
10018do
10019  IFS=$as_save_IFS
10020  test -z "$as_dir" && as_dir=.
10021    for ac_exec_ext in '' $ac_executable_extensions; do
10022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10023    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10025    break 2
10026  fi
10027done
10028  done
10029IFS=$as_save_IFS
10030
10031  ;;
10032esac
10033fi
10034NAWK=$ac_cv_path_NAWK
10035if test -n "$NAWK"; then
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10037$as_echo "$NAWK" >&6; }
10038else
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
10041fi
10042
10043
10044  test -n "$NAWK" && break
10045done
10046
10047    else
10048      # If it succeeded, then it was overridden by the user. We will use it
10049      # for the tool.
10050
10051      # First remove it from the list of overridden variables, so we can test
10052      # for unknown variables in the end.
10053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10054
10055      # Check if we try to supply an empty value
10056      if test "x$NAWK" = x; then
10057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10058$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10060$as_echo_n "checking for NAWK... " >&6; }
10061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10062$as_echo "disabled" >&6; }
10063      else
10064        # Check if the provided tool contains a complete path.
10065        tool_specified="$NAWK"
10066        tool_basename="${tool_specified##*/}"
10067        if test "x$tool_basename" = "x$tool_specified"; then
10068          # A command without a complete path is provided, search $PATH.
10069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10070$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10071          # Extract the first word of "$tool_basename", so it can be a program name with args.
10072set dummy $tool_basename; ac_word=$2
10073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10074$as_echo_n "checking for $ac_word... " >&6; }
10075if ${ac_cv_path_NAWK+:} false; then :
10076  $as_echo_n "(cached) " >&6
10077else
10078  case $NAWK in
10079  [\\/]* | ?:[\\/]*)
10080  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10081  ;;
10082  *)
10083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10084for as_dir in $PATH
10085do
10086  IFS=$as_save_IFS
10087  test -z "$as_dir" && as_dir=.
10088    for ac_exec_ext in '' $ac_executable_extensions; do
10089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10090    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10092    break 2
10093  fi
10094done
10095  done
10096IFS=$as_save_IFS
10097
10098  ;;
10099esac
10100fi
10101NAWK=$ac_cv_path_NAWK
10102if test -n "$NAWK"; then
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10104$as_echo "$NAWK" >&6; }
10105else
10106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
10108fi
10109
10110
10111          if test "x$NAWK" = x; then
10112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10113          fi
10114        else
10115          # Otherwise we believe it is a complete path. Use it as it is.
10116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10117$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10119$as_echo_n "checking for NAWK... " >&6; }
10120          if test ! -x "$tool_specified"; then
10121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10122$as_echo "not found" >&6; }
10123            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10124          fi
10125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10126$as_echo "$tool_specified" >&6; }
10127        fi
10128      fi
10129    fi
10130
10131  fi
10132
10133
10134
10135  if test "x$NAWK" = x; then
10136    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10137  fi
10138
10139
10140
10141
10142
10143  # Publish this variable in the help.
10144
10145
10146  if [ -z "${PRINTF+x}" ]; then
10147    # The variable is not set by user, try to locate tool using the code snippet
10148    for ac_prog in printf
10149do
10150  # Extract the first word of "$ac_prog", so it can be a program name with args.
10151set dummy $ac_prog; ac_word=$2
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if ${ac_cv_path_PRINTF+:} false; then :
10155  $as_echo_n "(cached) " >&6
10156else
10157  case $PRINTF in
10158  [\\/]* | ?:[\\/]*)
10159  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10160  ;;
10161  *)
10162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  test -z "$as_dir" && as_dir=.
10167    for ac_exec_ext in '' $ac_executable_extensions; do
10168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10169    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10171    break 2
10172  fi
10173done
10174  done
10175IFS=$as_save_IFS
10176
10177  ;;
10178esac
10179fi
10180PRINTF=$ac_cv_path_PRINTF
10181if test -n "$PRINTF"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10183$as_echo "$PRINTF" >&6; }
10184else
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190  test -n "$PRINTF" && break
10191done
10192
10193  else
10194    # The variable is set, but is it from the command line or the environment?
10195
10196    # Try to remove the string !PRINTF! from our list.
10197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10199      # If it failed, the variable was not from the command line. Ignore it,
10200      # but warn the user (except for BASH, which is always set by the calling BASH).
10201      if test "xPRINTF" != xBASH; then
10202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10203$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10204      fi
10205      # Try to locate tool using the code snippet
10206      for ac_prog in printf
10207do
10208  # Extract the first word of "$ac_prog", so it can be a program name with args.
10209set dummy $ac_prog; ac_word=$2
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211$as_echo_n "checking for $ac_word... " >&6; }
10212if ${ac_cv_path_PRINTF+:} false; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  case $PRINTF in
10216  [\\/]* | ?:[\\/]*)
10217  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10218  ;;
10219  *)
10220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221for as_dir in $PATH
10222do
10223  IFS=$as_save_IFS
10224  test -z "$as_dir" && as_dir=.
10225    for ac_exec_ext in '' $ac_executable_extensions; do
10226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10227    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229    break 2
10230  fi
10231done
10232  done
10233IFS=$as_save_IFS
10234
10235  ;;
10236esac
10237fi
10238PRINTF=$ac_cv_path_PRINTF
10239if test -n "$PRINTF"; then
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10241$as_echo "$PRINTF" >&6; }
10242else
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245fi
10246
10247
10248  test -n "$PRINTF" && break
10249done
10250
10251    else
10252      # If it succeeded, then it was overridden by the user. We will use it
10253      # for the tool.
10254
10255      # First remove it from the list of overridden variables, so we can test
10256      # for unknown variables in the end.
10257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10258
10259      # Check if we try to supply an empty value
10260      if test "x$PRINTF" = x; then
10261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10262$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10264$as_echo_n "checking for PRINTF... " >&6; }
10265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10266$as_echo "disabled" >&6; }
10267      else
10268        # Check if the provided tool contains a complete path.
10269        tool_specified="$PRINTF"
10270        tool_basename="${tool_specified##*/}"
10271        if test "x$tool_basename" = "x$tool_specified"; then
10272          # A command without a complete path is provided, search $PATH.
10273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10274$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10275          # Extract the first word of "$tool_basename", so it can be a program name with args.
10276set dummy $tool_basename; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_PRINTF+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $PRINTF in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305PRINTF=$ac_cv_path_PRINTF
10306if test -n "$PRINTF"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10308$as_echo "$PRINTF" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315          if test "x$PRINTF" = x; then
10316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10317          fi
10318        else
10319          # Otherwise we believe it is a complete path. Use it as it is.
10320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10321$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10323$as_echo_n "checking for PRINTF... " >&6; }
10324          if test ! -x "$tool_specified"; then
10325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10326$as_echo "not found" >&6; }
10327            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10328          fi
10329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10330$as_echo "$tool_specified" >&6; }
10331        fi
10332      fi
10333    fi
10334
10335  fi
10336
10337
10338
10339  if test "x$PRINTF" = x; then
10340    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10341  fi
10342
10343
10344
10345
10346
10347  # Publish this variable in the help.
10348
10349
10350  if [ -z "${RM+x}" ]; then
10351    # The variable is not set by user, try to locate tool using the code snippet
10352    for ac_prog in rm
10353do
10354  # Extract the first word of "$ac_prog", so it can be a program name with args.
10355set dummy $ac_prog; ac_word=$2
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357$as_echo_n "checking for $ac_word... " >&6; }
10358if ${ac_cv_path_RM+:} false; then :
10359  $as_echo_n "(cached) " >&6
10360else
10361  case $RM in
10362  [\\/]* | ?:[\\/]*)
10363  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10364  ;;
10365  *)
10366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367for as_dir in $PATH
10368do
10369  IFS=$as_save_IFS
10370  test -z "$as_dir" && as_dir=.
10371    for ac_exec_ext in '' $ac_executable_extensions; do
10372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375    break 2
10376  fi
10377done
10378  done
10379IFS=$as_save_IFS
10380
10381  ;;
10382esac
10383fi
10384RM=$ac_cv_path_RM
10385if test -n "$RM"; then
10386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10387$as_echo "$RM" >&6; }
10388else
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393
10394  test -n "$RM" && break
10395done
10396
10397  else
10398    # The variable is set, but is it from the command line or the environment?
10399
10400    # Try to remove the string !RM! from our list.
10401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10403      # If it failed, the variable was not from the command line. Ignore it,
10404      # but warn the user (except for BASH, which is always set by the calling BASH).
10405      if test "xRM" != xBASH; then
10406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10407$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10408      fi
10409      # Try to locate tool using the code snippet
10410      for ac_prog in rm
10411do
10412  # Extract the first word of "$ac_prog", so it can be a program name with args.
10413set dummy $ac_prog; ac_word=$2
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415$as_echo_n "checking for $ac_word... " >&6; }
10416if ${ac_cv_path_RM+:} false; then :
10417  $as_echo_n "(cached) " >&6
10418else
10419  case $RM in
10420  [\\/]* | ?:[\\/]*)
10421  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10422  ;;
10423  *)
10424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425for as_dir in $PATH
10426do
10427  IFS=$as_save_IFS
10428  test -z "$as_dir" && as_dir=.
10429    for ac_exec_ext in '' $ac_executable_extensions; do
10430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10431    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433    break 2
10434  fi
10435done
10436  done
10437IFS=$as_save_IFS
10438
10439  ;;
10440esac
10441fi
10442RM=$ac_cv_path_RM
10443if test -n "$RM"; then
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10445$as_echo "$RM" >&6; }
10446else
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
10449fi
10450
10451
10452  test -n "$RM" && break
10453done
10454
10455    else
10456      # If it succeeded, then it was overridden by the user. We will use it
10457      # for the tool.
10458
10459      # First remove it from the list of overridden variables, so we can test
10460      # for unknown variables in the end.
10461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10462
10463      # Check if we try to supply an empty value
10464      if test "x$RM" = x; then
10465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10466$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10468$as_echo_n "checking for RM... " >&6; }
10469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10470$as_echo "disabled" >&6; }
10471      else
10472        # Check if the provided tool contains a complete path.
10473        tool_specified="$RM"
10474        tool_basename="${tool_specified##*/}"
10475        if test "x$tool_basename" = "x$tool_specified"; then
10476          # A command without a complete path is provided, search $PATH.
10477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10478$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10479          # Extract the first word of "$tool_basename", so it can be a program name with args.
10480set dummy $tool_basename; ac_word=$2
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10482$as_echo_n "checking for $ac_word... " >&6; }
10483if ${ac_cv_path_RM+:} false; then :
10484  $as_echo_n "(cached) " >&6
10485else
10486  case $RM in
10487  [\\/]* | ?:[\\/]*)
10488  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10489  ;;
10490  *)
10491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10492for as_dir in $PATH
10493do
10494  IFS=$as_save_IFS
10495  test -z "$as_dir" && as_dir=.
10496    for ac_exec_ext in '' $ac_executable_extensions; do
10497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10498    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10500    break 2
10501  fi
10502done
10503  done
10504IFS=$as_save_IFS
10505
10506  ;;
10507esac
10508fi
10509RM=$ac_cv_path_RM
10510if test -n "$RM"; then
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10512$as_echo "$RM" >&6; }
10513else
10514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515$as_echo "no" >&6; }
10516fi
10517
10518
10519          if test "x$RM" = x; then
10520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10521          fi
10522        else
10523          # Otherwise we believe it is a complete path. Use it as it is.
10524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10525$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10527$as_echo_n "checking for RM... " >&6; }
10528          if test ! -x "$tool_specified"; then
10529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10530$as_echo "not found" >&6; }
10531            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10532          fi
10533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10534$as_echo "$tool_specified" >&6; }
10535        fi
10536      fi
10537    fi
10538
10539  fi
10540
10541
10542
10543  if test "x$RM" = x; then
10544    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10545  fi
10546
10547
10548
10549
10550
10551  # Publish this variable in the help.
10552
10553
10554  if [ -z "${RMDIR+x}" ]; then
10555    # The variable is not set by user, try to locate tool using the code snippet
10556    for ac_prog in rmdir
10557do
10558  # Extract the first word of "$ac_prog", so it can be a program name with args.
10559set dummy $ac_prog; ac_word=$2
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10561$as_echo_n "checking for $ac_word... " >&6; }
10562if ${ac_cv_path_RMDIR+:} false; then :
10563  $as_echo_n "(cached) " >&6
10564else
10565  case $RMDIR in
10566  [\\/]* | ?:[\\/]*)
10567  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10568  ;;
10569  *)
10570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10571for as_dir in $PATH
10572do
10573  IFS=$as_save_IFS
10574  test -z "$as_dir" && as_dir=.
10575    for ac_exec_ext in '' $ac_executable_extensions; do
10576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10577    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10579    break 2
10580  fi
10581done
10582  done
10583IFS=$as_save_IFS
10584
10585  ;;
10586esac
10587fi
10588RMDIR=$ac_cv_path_RMDIR
10589if test -n "$RMDIR"; then
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10591$as_echo "$RMDIR" >&6; }
10592else
10593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10594$as_echo "no" >&6; }
10595fi
10596
10597
10598  test -n "$RMDIR" && break
10599done
10600
10601  else
10602    # The variable is set, but is it from the command line or the environment?
10603
10604    # Try to remove the string !RMDIR! from our list.
10605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10607      # If it failed, the variable was not from the command line. Ignore it,
10608      # but warn the user (except for BASH, which is always set by the calling BASH).
10609      if test "xRMDIR" != xBASH; then
10610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10611$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10612      fi
10613      # Try to locate tool using the code snippet
10614      for ac_prog in rmdir
10615do
10616  # Extract the first word of "$ac_prog", so it can be a program name with args.
10617set dummy $ac_prog; ac_word=$2
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10619$as_echo_n "checking for $ac_word... " >&6; }
10620if ${ac_cv_path_RMDIR+:} false; then :
10621  $as_echo_n "(cached) " >&6
10622else
10623  case $RMDIR in
10624  [\\/]* | ?:[\\/]*)
10625  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10626  ;;
10627  *)
10628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629for as_dir in $PATH
10630do
10631  IFS=$as_save_IFS
10632  test -z "$as_dir" && as_dir=.
10633    for ac_exec_ext in '' $ac_executable_extensions; do
10634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10635    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637    break 2
10638  fi
10639done
10640  done
10641IFS=$as_save_IFS
10642
10643  ;;
10644esac
10645fi
10646RMDIR=$ac_cv_path_RMDIR
10647if test -n "$RMDIR"; then
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10649$as_echo "$RMDIR" >&6; }
10650else
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
10653fi
10654
10655
10656  test -n "$RMDIR" && break
10657done
10658
10659    else
10660      # If it succeeded, then it was overridden by the user. We will use it
10661      # for the tool.
10662
10663      # First remove it from the list of overridden variables, so we can test
10664      # for unknown variables in the end.
10665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10666
10667      # Check if we try to supply an empty value
10668      if test "x$RMDIR" = x; then
10669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10670$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10672$as_echo_n "checking for RMDIR... " >&6; }
10673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10674$as_echo "disabled" >&6; }
10675      else
10676        # Check if the provided tool contains a complete path.
10677        tool_specified="$RMDIR"
10678        tool_basename="${tool_specified##*/}"
10679        if test "x$tool_basename" = "x$tool_specified"; then
10680          # A command without a complete path is provided, search $PATH.
10681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10682$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10683          # Extract the first word of "$tool_basename", so it can be a program name with args.
10684set dummy $tool_basename; ac_word=$2
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10686$as_echo_n "checking for $ac_word... " >&6; }
10687if ${ac_cv_path_RMDIR+:} false; then :
10688  $as_echo_n "(cached) " >&6
10689else
10690  case $RMDIR in
10691  [\\/]* | ?:[\\/]*)
10692  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10693  ;;
10694  *)
10695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10696for as_dir in $PATH
10697do
10698  IFS=$as_save_IFS
10699  test -z "$as_dir" && as_dir=.
10700    for ac_exec_ext in '' $ac_executable_extensions; do
10701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10702    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10704    break 2
10705  fi
10706done
10707  done
10708IFS=$as_save_IFS
10709
10710  ;;
10711esac
10712fi
10713RMDIR=$ac_cv_path_RMDIR
10714if test -n "$RMDIR"; then
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10716$as_echo "$RMDIR" >&6; }
10717else
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719$as_echo "no" >&6; }
10720fi
10721
10722
10723          if test "x$RMDIR" = x; then
10724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10725          fi
10726        else
10727          # Otherwise we believe it is a complete path. Use it as it is.
10728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10729$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10731$as_echo_n "checking for RMDIR... " >&6; }
10732          if test ! -x "$tool_specified"; then
10733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10734$as_echo "not found" >&6; }
10735            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10736          fi
10737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10738$as_echo "$tool_specified" >&6; }
10739        fi
10740      fi
10741    fi
10742
10743  fi
10744
10745
10746
10747  if test "x$RMDIR" = x; then
10748    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10749  fi
10750
10751
10752
10753
10754
10755  # Publish this variable in the help.
10756
10757
10758  if [ -z "${SH+x}" ]; then
10759    # The variable is not set by user, try to locate tool using the code snippet
10760    for ac_prog in sh
10761do
10762  # Extract the first word of "$ac_prog", so it can be a program name with args.
10763set dummy $ac_prog; ac_word=$2
10764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10765$as_echo_n "checking for $ac_word... " >&6; }
10766if ${ac_cv_path_SH+:} false; then :
10767  $as_echo_n "(cached) " >&6
10768else
10769  case $SH in
10770  [\\/]* | ?:[\\/]*)
10771  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10772  ;;
10773  *)
10774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10775for as_dir in $PATH
10776do
10777  IFS=$as_save_IFS
10778  test -z "$as_dir" && as_dir=.
10779    for ac_exec_ext in '' $ac_executable_extensions; do
10780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10781    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10783    break 2
10784  fi
10785done
10786  done
10787IFS=$as_save_IFS
10788
10789  ;;
10790esac
10791fi
10792SH=$ac_cv_path_SH
10793if test -n "$SH"; then
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10795$as_echo "$SH" >&6; }
10796else
10797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10798$as_echo "no" >&6; }
10799fi
10800
10801
10802  test -n "$SH" && break
10803done
10804
10805  else
10806    # The variable is set, but is it from the command line or the environment?
10807
10808    # Try to remove the string !SH! from our list.
10809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10811      # If it failed, the variable was not from the command line. Ignore it,
10812      # but warn the user (except for BASH, which is always set by the calling BASH).
10813      if test "xSH" != xBASH; then
10814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10815$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10816      fi
10817      # Try to locate tool using the code snippet
10818      for ac_prog in sh
10819do
10820  # Extract the first word of "$ac_prog", so it can be a program name with args.
10821set dummy $ac_prog; ac_word=$2
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10823$as_echo_n "checking for $ac_word... " >&6; }
10824if ${ac_cv_path_SH+:} false; then :
10825  $as_echo_n "(cached) " >&6
10826else
10827  case $SH in
10828  [\\/]* | ?:[\\/]*)
10829  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10830  ;;
10831  *)
10832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10833for as_dir in $PATH
10834do
10835  IFS=$as_save_IFS
10836  test -z "$as_dir" && as_dir=.
10837    for ac_exec_ext in '' $ac_executable_extensions; do
10838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10839    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10841    break 2
10842  fi
10843done
10844  done
10845IFS=$as_save_IFS
10846
10847  ;;
10848esac
10849fi
10850SH=$ac_cv_path_SH
10851if test -n "$SH"; then
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10853$as_echo "$SH" >&6; }
10854else
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856$as_echo "no" >&6; }
10857fi
10858
10859
10860  test -n "$SH" && break
10861done
10862
10863    else
10864      # If it succeeded, then it was overridden by the user. We will use it
10865      # for the tool.
10866
10867      # First remove it from the list of overridden variables, so we can test
10868      # for unknown variables in the end.
10869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10870
10871      # Check if we try to supply an empty value
10872      if test "x$SH" = x; then
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10874$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10876$as_echo_n "checking for SH... " >&6; }
10877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10878$as_echo "disabled" >&6; }
10879      else
10880        # Check if the provided tool contains a complete path.
10881        tool_specified="$SH"
10882        tool_basename="${tool_specified##*/}"
10883        if test "x$tool_basename" = "x$tool_specified"; then
10884          # A command without a complete path is provided, search $PATH.
10885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10886$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10887          # Extract the first word of "$tool_basename", so it can be a program name with args.
10888set dummy $tool_basename; ac_word=$2
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10890$as_echo_n "checking for $ac_word... " >&6; }
10891if ${ac_cv_path_SH+:} false; then :
10892  $as_echo_n "(cached) " >&6
10893else
10894  case $SH in
10895  [\\/]* | ?:[\\/]*)
10896  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10897  ;;
10898  *)
10899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10900for as_dir in $PATH
10901do
10902  IFS=$as_save_IFS
10903  test -z "$as_dir" && as_dir=.
10904    for ac_exec_ext in '' $ac_executable_extensions; do
10905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10906    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10908    break 2
10909  fi
10910done
10911  done
10912IFS=$as_save_IFS
10913
10914  ;;
10915esac
10916fi
10917SH=$ac_cv_path_SH
10918if test -n "$SH"; then
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10920$as_echo "$SH" >&6; }
10921else
10922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923$as_echo "no" >&6; }
10924fi
10925
10926
10927          if test "x$SH" = x; then
10928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10929          fi
10930        else
10931          # Otherwise we believe it is a complete path. Use it as it is.
10932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10933$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10935$as_echo_n "checking for SH... " >&6; }
10936          if test ! -x "$tool_specified"; then
10937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10938$as_echo "not found" >&6; }
10939            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10940          fi
10941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10942$as_echo "$tool_specified" >&6; }
10943        fi
10944      fi
10945    fi
10946
10947  fi
10948
10949
10950
10951  if test "x$SH" = x; then
10952    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10953  fi
10954
10955
10956
10957
10958
10959  # Publish this variable in the help.
10960
10961
10962  if [ -z "${SORT+x}" ]; then
10963    # The variable is not set by user, try to locate tool using the code snippet
10964    for ac_prog in sort
10965do
10966  # Extract the first word of "$ac_prog", so it can be a program name with args.
10967set dummy $ac_prog; ac_word=$2
10968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10969$as_echo_n "checking for $ac_word... " >&6; }
10970if ${ac_cv_path_SORT+:} false; then :
10971  $as_echo_n "(cached) " >&6
10972else
10973  case $SORT in
10974  [\\/]* | ?:[\\/]*)
10975  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10976  ;;
10977  *)
10978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10979for as_dir in $PATH
10980do
10981  IFS=$as_save_IFS
10982  test -z "$as_dir" && as_dir=.
10983    for ac_exec_ext in '' $ac_executable_extensions; do
10984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10985    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10987    break 2
10988  fi
10989done
10990  done
10991IFS=$as_save_IFS
10992
10993  ;;
10994esac
10995fi
10996SORT=$ac_cv_path_SORT
10997if test -n "$SORT"; then
10998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10999$as_echo "$SORT" >&6; }
11000else
11001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
11003fi
11004
11005
11006  test -n "$SORT" && break
11007done
11008
11009  else
11010    # The variable is set, but is it from the command line or the environment?
11011
11012    # Try to remove the string !SORT! from our list.
11013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11015      # If it failed, the variable was not from the command line. Ignore it,
11016      # but warn the user (except for BASH, which is always set by the calling BASH).
11017      if test "xSORT" != xBASH; then
11018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11019$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11020      fi
11021      # Try to locate tool using the code snippet
11022      for ac_prog in sort
11023do
11024  # Extract the first word of "$ac_prog", so it can be a program name with args.
11025set dummy $ac_prog; ac_word=$2
11026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11027$as_echo_n "checking for $ac_word... " >&6; }
11028if ${ac_cv_path_SORT+:} false; then :
11029  $as_echo_n "(cached) " >&6
11030else
11031  case $SORT in
11032  [\\/]* | ?:[\\/]*)
11033  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11034  ;;
11035  *)
11036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11037for as_dir in $PATH
11038do
11039  IFS=$as_save_IFS
11040  test -z "$as_dir" && as_dir=.
11041    for ac_exec_ext in '' $ac_executable_extensions; do
11042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11043    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11045    break 2
11046  fi
11047done
11048  done
11049IFS=$as_save_IFS
11050
11051  ;;
11052esac
11053fi
11054SORT=$ac_cv_path_SORT
11055if test -n "$SORT"; then
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11057$as_echo "$SORT" >&6; }
11058else
11059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060$as_echo "no" >&6; }
11061fi
11062
11063
11064  test -n "$SORT" && break
11065done
11066
11067    else
11068      # If it succeeded, then it was overridden by the user. We will use it
11069      # for the tool.
11070
11071      # First remove it from the list of overridden variables, so we can test
11072      # for unknown variables in the end.
11073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11074
11075      # Check if we try to supply an empty value
11076      if test "x$SORT" = x; then
11077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11078$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11080$as_echo_n "checking for SORT... " >&6; }
11081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11082$as_echo "disabled" >&6; }
11083      else
11084        # Check if the provided tool contains a complete path.
11085        tool_specified="$SORT"
11086        tool_basename="${tool_specified##*/}"
11087        if test "x$tool_basename" = "x$tool_specified"; then
11088          # A command without a complete path is provided, search $PATH.
11089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11090$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11091          # Extract the first word of "$tool_basename", so it can be a program name with args.
11092set dummy $tool_basename; ac_word=$2
11093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11094$as_echo_n "checking for $ac_word... " >&6; }
11095if ${ac_cv_path_SORT+:} false; then :
11096  $as_echo_n "(cached) " >&6
11097else
11098  case $SORT in
11099  [\\/]* | ?:[\\/]*)
11100  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11101  ;;
11102  *)
11103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11104for as_dir in $PATH
11105do
11106  IFS=$as_save_IFS
11107  test -z "$as_dir" && as_dir=.
11108    for ac_exec_ext in '' $ac_executable_extensions; do
11109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11110    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11112    break 2
11113  fi
11114done
11115  done
11116IFS=$as_save_IFS
11117
11118  ;;
11119esac
11120fi
11121SORT=$ac_cv_path_SORT
11122if test -n "$SORT"; then
11123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11124$as_echo "$SORT" >&6; }
11125else
11126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11127$as_echo "no" >&6; }
11128fi
11129
11130
11131          if test "x$SORT" = x; then
11132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11133          fi
11134        else
11135          # Otherwise we believe it is a complete path. Use it as it is.
11136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11137$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11139$as_echo_n "checking for SORT... " >&6; }
11140          if test ! -x "$tool_specified"; then
11141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11142$as_echo "not found" >&6; }
11143            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11144          fi
11145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11146$as_echo "$tool_specified" >&6; }
11147        fi
11148      fi
11149    fi
11150
11151  fi
11152
11153
11154
11155  if test "x$SORT" = x; then
11156    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11157  fi
11158
11159
11160
11161
11162
11163  # Publish this variable in the help.
11164
11165
11166  if [ -z "${TAIL+x}" ]; then
11167    # The variable is not set by user, try to locate tool using the code snippet
11168    for ac_prog in tail
11169do
11170  # Extract the first word of "$ac_prog", so it can be a program name with args.
11171set dummy $ac_prog; ac_word=$2
11172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11173$as_echo_n "checking for $ac_word... " >&6; }
11174if ${ac_cv_path_TAIL+:} false; then :
11175  $as_echo_n "(cached) " >&6
11176else
11177  case $TAIL in
11178  [\\/]* | ?:[\\/]*)
11179  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11180  ;;
11181  *)
11182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11183for as_dir in $PATH
11184do
11185  IFS=$as_save_IFS
11186  test -z "$as_dir" && as_dir=.
11187    for ac_exec_ext in '' $ac_executable_extensions; do
11188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11189    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11191    break 2
11192  fi
11193done
11194  done
11195IFS=$as_save_IFS
11196
11197  ;;
11198esac
11199fi
11200TAIL=$ac_cv_path_TAIL
11201if test -n "$TAIL"; then
11202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11203$as_echo "$TAIL" >&6; }
11204else
11205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11206$as_echo "no" >&6; }
11207fi
11208
11209
11210  test -n "$TAIL" && break
11211done
11212
11213  else
11214    # The variable is set, but is it from the command line or the environment?
11215
11216    # Try to remove the string !TAIL! from our list.
11217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11219      # If it failed, the variable was not from the command line. Ignore it,
11220      # but warn the user (except for BASH, which is always set by the calling BASH).
11221      if test "xTAIL" != xBASH; then
11222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11223$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11224      fi
11225      # Try to locate tool using the code snippet
11226      for ac_prog in tail
11227do
11228  # Extract the first word of "$ac_prog", so it can be a program name with args.
11229set dummy $ac_prog; ac_word=$2
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11231$as_echo_n "checking for $ac_word... " >&6; }
11232if ${ac_cv_path_TAIL+:} false; then :
11233  $as_echo_n "(cached) " >&6
11234else
11235  case $TAIL in
11236  [\\/]* | ?:[\\/]*)
11237  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11238  ;;
11239  *)
11240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241for as_dir in $PATH
11242do
11243  IFS=$as_save_IFS
11244  test -z "$as_dir" && as_dir=.
11245    for ac_exec_ext in '' $ac_executable_extensions; do
11246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249    break 2
11250  fi
11251done
11252  done
11253IFS=$as_save_IFS
11254
11255  ;;
11256esac
11257fi
11258TAIL=$ac_cv_path_TAIL
11259if test -n "$TAIL"; then
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11261$as_echo "$TAIL" >&6; }
11262else
11263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11264$as_echo "no" >&6; }
11265fi
11266
11267
11268  test -n "$TAIL" && break
11269done
11270
11271    else
11272      # If it succeeded, then it was overridden by the user. We will use it
11273      # for the tool.
11274
11275      # First remove it from the list of overridden variables, so we can test
11276      # for unknown variables in the end.
11277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11278
11279      # Check if we try to supply an empty value
11280      if test "x$TAIL" = x; then
11281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11282$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11284$as_echo_n "checking for TAIL... " >&6; }
11285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11286$as_echo "disabled" >&6; }
11287      else
11288        # Check if the provided tool contains a complete path.
11289        tool_specified="$TAIL"
11290        tool_basename="${tool_specified##*/}"
11291        if test "x$tool_basename" = "x$tool_specified"; then
11292          # A command without a complete path is provided, search $PATH.
11293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11294$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11295          # Extract the first word of "$tool_basename", so it can be a program name with args.
11296set dummy $tool_basename; ac_word=$2
11297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11298$as_echo_n "checking for $ac_word... " >&6; }
11299if ${ac_cv_path_TAIL+:} false; then :
11300  $as_echo_n "(cached) " >&6
11301else
11302  case $TAIL in
11303  [\\/]* | ?:[\\/]*)
11304  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11305  ;;
11306  *)
11307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11308for as_dir in $PATH
11309do
11310  IFS=$as_save_IFS
11311  test -z "$as_dir" && as_dir=.
11312    for ac_exec_ext in '' $ac_executable_extensions; do
11313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11314    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11316    break 2
11317  fi
11318done
11319  done
11320IFS=$as_save_IFS
11321
11322  ;;
11323esac
11324fi
11325TAIL=$ac_cv_path_TAIL
11326if test -n "$TAIL"; then
11327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11328$as_echo "$TAIL" >&6; }
11329else
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11331$as_echo "no" >&6; }
11332fi
11333
11334
11335          if test "x$TAIL" = x; then
11336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11337          fi
11338        else
11339          # Otherwise we believe it is a complete path. Use it as it is.
11340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11341$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11343$as_echo_n "checking for TAIL... " >&6; }
11344          if test ! -x "$tool_specified"; then
11345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11346$as_echo "not found" >&6; }
11347            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11348          fi
11349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11350$as_echo "$tool_specified" >&6; }
11351        fi
11352      fi
11353    fi
11354
11355  fi
11356
11357
11358
11359  if test "x$TAIL" = x; then
11360    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11361  fi
11362
11363
11364
11365
11366
11367  # Publish this variable in the help.
11368
11369
11370  if [ -z "${TAR+x}" ]; then
11371    # The variable is not set by user, try to locate tool using the code snippet
11372    for ac_prog in gtar tar
11373do
11374  # Extract the first word of "$ac_prog", so it can be a program name with args.
11375set dummy $ac_prog; ac_word=$2
11376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11377$as_echo_n "checking for $ac_word... " >&6; }
11378if ${ac_cv_path_TAR+:} false; then :
11379  $as_echo_n "(cached) " >&6
11380else
11381  case $TAR in
11382  [\\/]* | ?:[\\/]*)
11383  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11384  ;;
11385  *)
11386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11387for as_dir in $PATH
11388do
11389  IFS=$as_save_IFS
11390  test -z "$as_dir" && as_dir=.
11391    for ac_exec_ext in '' $ac_executable_extensions; do
11392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11393    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11395    break 2
11396  fi
11397done
11398  done
11399IFS=$as_save_IFS
11400
11401  ;;
11402esac
11403fi
11404TAR=$ac_cv_path_TAR
11405if test -n "$TAR"; then
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11407$as_echo "$TAR" >&6; }
11408else
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
11411fi
11412
11413
11414  test -n "$TAR" && break
11415done
11416
11417  else
11418    # The variable is set, but is it from the command line or the environment?
11419
11420    # Try to remove the string !TAR! from our list.
11421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11423      # If it failed, the variable was not from the command line. Ignore it,
11424      # but warn the user (except for BASH, which is always set by the calling BASH).
11425      if test "xTAR" != xBASH; then
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11427$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11428      fi
11429      # Try to locate tool using the code snippet
11430      for ac_prog in gtar tar
11431do
11432  # Extract the first word of "$ac_prog", so it can be a program name with args.
11433set dummy $ac_prog; ac_word=$2
11434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11435$as_echo_n "checking for $ac_word... " >&6; }
11436if ${ac_cv_path_TAR+:} false; then :
11437  $as_echo_n "(cached) " >&6
11438else
11439  case $TAR in
11440  [\\/]* | ?:[\\/]*)
11441  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11442  ;;
11443  *)
11444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11445for as_dir in $PATH
11446do
11447  IFS=$as_save_IFS
11448  test -z "$as_dir" && as_dir=.
11449    for ac_exec_ext in '' $ac_executable_extensions; do
11450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11451    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11453    break 2
11454  fi
11455done
11456  done
11457IFS=$as_save_IFS
11458
11459  ;;
11460esac
11461fi
11462TAR=$ac_cv_path_TAR
11463if test -n "$TAR"; then
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11465$as_echo "$TAR" >&6; }
11466else
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468$as_echo "no" >&6; }
11469fi
11470
11471
11472  test -n "$TAR" && break
11473done
11474
11475    else
11476      # If it succeeded, then it was overridden by the user. We will use it
11477      # for the tool.
11478
11479      # First remove it from the list of overridden variables, so we can test
11480      # for unknown variables in the end.
11481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11482
11483      # Check if we try to supply an empty value
11484      if test "x$TAR" = x; then
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11486$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11488$as_echo_n "checking for TAR... " >&6; }
11489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11490$as_echo "disabled" >&6; }
11491      else
11492        # Check if the provided tool contains a complete path.
11493        tool_specified="$TAR"
11494        tool_basename="${tool_specified##*/}"
11495        if test "x$tool_basename" = "x$tool_specified"; then
11496          # A command without a complete path is provided, search $PATH.
11497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11498$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11499          # Extract the first word of "$tool_basename", so it can be a program name with args.
11500set dummy $tool_basename; ac_word=$2
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11502$as_echo_n "checking for $ac_word... " >&6; }
11503if ${ac_cv_path_TAR+:} false; then :
11504  $as_echo_n "(cached) " >&6
11505else
11506  case $TAR in
11507  [\\/]* | ?:[\\/]*)
11508  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11509  ;;
11510  *)
11511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11512for as_dir in $PATH
11513do
11514  IFS=$as_save_IFS
11515  test -z "$as_dir" && as_dir=.
11516    for ac_exec_ext in '' $ac_executable_extensions; do
11517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11518    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11520    break 2
11521  fi
11522done
11523  done
11524IFS=$as_save_IFS
11525
11526  ;;
11527esac
11528fi
11529TAR=$ac_cv_path_TAR
11530if test -n "$TAR"; then
11531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11532$as_echo "$TAR" >&6; }
11533else
11534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
11536fi
11537
11538
11539          if test "x$TAR" = x; then
11540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11541          fi
11542        else
11543          # Otherwise we believe it is a complete path. Use it as it is.
11544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11545$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11547$as_echo_n "checking for TAR... " >&6; }
11548          if test ! -x "$tool_specified"; then
11549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11550$as_echo "not found" >&6; }
11551            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11552          fi
11553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11554$as_echo "$tool_specified" >&6; }
11555        fi
11556      fi
11557    fi
11558
11559  fi
11560
11561
11562
11563  if test "x$TAR" = x; then
11564    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11565  fi
11566
11567
11568
11569
11570
11571  # Publish this variable in the help.
11572
11573
11574  if [ -z "${TEE+x}" ]; then
11575    # The variable is not set by user, try to locate tool using the code snippet
11576    for ac_prog in tee
11577do
11578  # Extract the first word of "$ac_prog", so it can be a program name with args.
11579set dummy $ac_prog; ac_word=$2
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11581$as_echo_n "checking for $ac_word... " >&6; }
11582if ${ac_cv_path_TEE+:} false; then :
11583  $as_echo_n "(cached) " >&6
11584else
11585  case $TEE in
11586  [\\/]* | ?:[\\/]*)
11587  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11588  ;;
11589  *)
11590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11591for as_dir in $PATH
11592do
11593  IFS=$as_save_IFS
11594  test -z "$as_dir" && as_dir=.
11595    for ac_exec_ext in '' $ac_executable_extensions; do
11596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11597    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11599    break 2
11600  fi
11601done
11602  done
11603IFS=$as_save_IFS
11604
11605  ;;
11606esac
11607fi
11608TEE=$ac_cv_path_TEE
11609if test -n "$TEE"; then
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11611$as_echo "$TEE" >&6; }
11612else
11613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614$as_echo "no" >&6; }
11615fi
11616
11617
11618  test -n "$TEE" && break
11619done
11620
11621  else
11622    # The variable is set, but is it from the command line or the environment?
11623
11624    # Try to remove the string !TEE! from our list.
11625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11627      # If it failed, the variable was not from the command line. Ignore it,
11628      # but warn the user (except for BASH, which is always set by the calling BASH).
11629      if test "xTEE" != xBASH; then
11630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11631$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11632      fi
11633      # Try to locate tool using the code snippet
11634      for ac_prog in tee
11635do
11636  # Extract the first word of "$ac_prog", so it can be a program name with args.
11637set dummy $ac_prog; ac_word=$2
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11639$as_echo_n "checking for $ac_word... " >&6; }
11640if ${ac_cv_path_TEE+:} false; then :
11641  $as_echo_n "(cached) " >&6
11642else
11643  case $TEE in
11644  [\\/]* | ?:[\\/]*)
11645  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11646  ;;
11647  *)
11648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11649for as_dir in $PATH
11650do
11651  IFS=$as_save_IFS
11652  test -z "$as_dir" && as_dir=.
11653    for ac_exec_ext in '' $ac_executable_extensions; do
11654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11655    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11657    break 2
11658  fi
11659done
11660  done
11661IFS=$as_save_IFS
11662
11663  ;;
11664esac
11665fi
11666TEE=$ac_cv_path_TEE
11667if test -n "$TEE"; then
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11669$as_echo "$TEE" >&6; }
11670else
11671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11672$as_echo "no" >&6; }
11673fi
11674
11675
11676  test -n "$TEE" && break
11677done
11678
11679    else
11680      # If it succeeded, then it was overridden by the user. We will use it
11681      # for the tool.
11682
11683      # First remove it from the list of overridden variables, so we can test
11684      # for unknown variables in the end.
11685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11686
11687      # Check if we try to supply an empty value
11688      if test "x$TEE" = x; then
11689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11690$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11692$as_echo_n "checking for TEE... " >&6; }
11693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11694$as_echo "disabled" >&6; }
11695      else
11696        # Check if the provided tool contains a complete path.
11697        tool_specified="$TEE"
11698        tool_basename="${tool_specified##*/}"
11699        if test "x$tool_basename" = "x$tool_specified"; then
11700          # A command without a complete path is provided, search $PATH.
11701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11702$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11703          # Extract the first word of "$tool_basename", so it can be a program name with args.
11704set dummy $tool_basename; ac_word=$2
11705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11706$as_echo_n "checking for $ac_word... " >&6; }
11707if ${ac_cv_path_TEE+:} false; then :
11708  $as_echo_n "(cached) " >&6
11709else
11710  case $TEE in
11711  [\\/]* | ?:[\\/]*)
11712  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11713  ;;
11714  *)
11715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11716for as_dir in $PATH
11717do
11718  IFS=$as_save_IFS
11719  test -z "$as_dir" && as_dir=.
11720    for ac_exec_ext in '' $ac_executable_extensions; do
11721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11722    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11724    break 2
11725  fi
11726done
11727  done
11728IFS=$as_save_IFS
11729
11730  ;;
11731esac
11732fi
11733TEE=$ac_cv_path_TEE
11734if test -n "$TEE"; then
11735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11736$as_echo "$TEE" >&6; }
11737else
11738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
11740fi
11741
11742
11743          if test "x$TEE" = x; then
11744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11745          fi
11746        else
11747          # Otherwise we believe it is a complete path. Use it as it is.
11748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11749$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11751$as_echo_n "checking for TEE... " >&6; }
11752          if test ! -x "$tool_specified"; then
11753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11754$as_echo "not found" >&6; }
11755            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11756          fi
11757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11758$as_echo "$tool_specified" >&6; }
11759        fi
11760      fi
11761    fi
11762
11763  fi
11764
11765
11766
11767  if test "x$TEE" = x; then
11768    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11769  fi
11770
11771
11772
11773
11774
11775  # Publish this variable in the help.
11776
11777
11778  if [ -z "${TOUCH+x}" ]; then
11779    # The variable is not set by user, try to locate tool using the code snippet
11780    for ac_prog in touch
11781do
11782  # Extract the first word of "$ac_prog", so it can be a program name with args.
11783set dummy $ac_prog; ac_word=$2
11784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11785$as_echo_n "checking for $ac_word... " >&6; }
11786if ${ac_cv_path_TOUCH+:} false; then :
11787  $as_echo_n "(cached) " >&6
11788else
11789  case $TOUCH in
11790  [\\/]* | ?:[\\/]*)
11791  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11792  ;;
11793  *)
11794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11795for as_dir in $PATH
11796do
11797  IFS=$as_save_IFS
11798  test -z "$as_dir" && as_dir=.
11799    for ac_exec_ext in '' $ac_executable_extensions; do
11800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11801    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11803    break 2
11804  fi
11805done
11806  done
11807IFS=$as_save_IFS
11808
11809  ;;
11810esac
11811fi
11812TOUCH=$ac_cv_path_TOUCH
11813if test -n "$TOUCH"; then
11814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11815$as_echo "$TOUCH" >&6; }
11816else
11817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
11819fi
11820
11821
11822  test -n "$TOUCH" && break
11823done
11824
11825  else
11826    # The variable is set, but is it from the command line or the environment?
11827
11828    # Try to remove the string !TOUCH! from our list.
11829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11831      # If it failed, the variable was not from the command line. Ignore it,
11832      # but warn the user (except for BASH, which is always set by the calling BASH).
11833      if test "xTOUCH" != xBASH; then
11834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11835$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11836      fi
11837      # Try to locate tool using the code snippet
11838      for ac_prog in touch
11839do
11840  # Extract the first word of "$ac_prog", so it can be a program name with args.
11841set dummy $ac_prog; ac_word=$2
11842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11843$as_echo_n "checking for $ac_word... " >&6; }
11844if ${ac_cv_path_TOUCH+:} false; then :
11845  $as_echo_n "(cached) " >&6
11846else
11847  case $TOUCH in
11848  [\\/]* | ?:[\\/]*)
11849  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11850  ;;
11851  *)
11852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11853for as_dir in $PATH
11854do
11855  IFS=$as_save_IFS
11856  test -z "$as_dir" && as_dir=.
11857    for ac_exec_ext in '' $ac_executable_extensions; do
11858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11859    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11861    break 2
11862  fi
11863done
11864  done
11865IFS=$as_save_IFS
11866
11867  ;;
11868esac
11869fi
11870TOUCH=$ac_cv_path_TOUCH
11871if test -n "$TOUCH"; then
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11873$as_echo "$TOUCH" >&6; }
11874else
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11876$as_echo "no" >&6; }
11877fi
11878
11879
11880  test -n "$TOUCH" && break
11881done
11882
11883    else
11884      # If it succeeded, then it was overridden by the user. We will use it
11885      # for the tool.
11886
11887      # First remove it from the list of overridden variables, so we can test
11888      # for unknown variables in the end.
11889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11890
11891      # Check if we try to supply an empty value
11892      if test "x$TOUCH" = x; then
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11894$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11896$as_echo_n "checking for TOUCH... " >&6; }
11897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11898$as_echo "disabled" >&6; }
11899      else
11900        # Check if the provided tool contains a complete path.
11901        tool_specified="$TOUCH"
11902        tool_basename="${tool_specified##*/}"
11903        if test "x$tool_basename" = "x$tool_specified"; then
11904          # A command without a complete path is provided, search $PATH.
11905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11906$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11907          # Extract the first word of "$tool_basename", so it can be a program name with args.
11908set dummy $tool_basename; ac_word=$2
11909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11910$as_echo_n "checking for $ac_word... " >&6; }
11911if ${ac_cv_path_TOUCH+:} false; then :
11912  $as_echo_n "(cached) " >&6
11913else
11914  case $TOUCH in
11915  [\\/]* | ?:[\\/]*)
11916  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11917  ;;
11918  *)
11919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11920for as_dir in $PATH
11921do
11922  IFS=$as_save_IFS
11923  test -z "$as_dir" && as_dir=.
11924    for ac_exec_ext in '' $ac_executable_extensions; do
11925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11926    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11928    break 2
11929  fi
11930done
11931  done
11932IFS=$as_save_IFS
11933
11934  ;;
11935esac
11936fi
11937TOUCH=$ac_cv_path_TOUCH
11938if test -n "$TOUCH"; then
11939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11940$as_echo "$TOUCH" >&6; }
11941else
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11943$as_echo "no" >&6; }
11944fi
11945
11946
11947          if test "x$TOUCH" = x; then
11948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11949          fi
11950        else
11951          # Otherwise we believe it is a complete path. Use it as it is.
11952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11953$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11955$as_echo_n "checking for TOUCH... " >&6; }
11956          if test ! -x "$tool_specified"; then
11957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11958$as_echo "not found" >&6; }
11959            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11960          fi
11961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11962$as_echo "$tool_specified" >&6; }
11963        fi
11964      fi
11965    fi
11966
11967  fi
11968
11969
11970
11971  if test "x$TOUCH" = x; then
11972    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11973  fi
11974
11975
11976
11977
11978
11979  # Publish this variable in the help.
11980
11981
11982  if [ -z "${TR+x}" ]; then
11983    # The variable is not set by user, try to locate tool using the code snippet
11984    for ac_prog in tr
11985do
11986  # Extract the first word of "$ac_prog", so it can be a program name with args.
11987set dummy $ac_prog; ac_word=$2
11988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11989$as_echo_n "checking for $ac_word... " >&6; }
11990if ${ac_cv_path_TR+:} false; then :
11991  $as_echo_n "(cached) " >&6
11992else
11993  case $TR in
11994  [\\/]* | ?:[\\/]*)
11995  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11996  ;;
11997  *)
11998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11999for as_dir in $PATH
12000do
12001  IFS=$as_save_IFS
12002  test -z "$as_dir" && as_dir=.
12003    for ac_exec_ext in '' $ac_executable_extensions; do
12004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12005    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12007    break 2
12008  fi
12009done
12010  done
12011IFS=$as_save_IFS
12012
12013  ;;
12014esac
12015fi
12016TR=$ac_cv_path_TR
12017if test -n "$TR"; then
12018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12019$as_echo "$TR" >&6; }
12020else
12021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12022$as_echo "no" >&6; }
12023fi
12024
12025
12026  test -n "$TR" && break
12027done
12028
12029  else
12030    # The variable is set, but is it from the command line or the environment?
12031
12032    # Try to remove the string !TR! from our list.
12033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12035      # If it failed, the variable was not from the command line. Ignore it,
12036      # but warn the user (except for BASH, which is always set by the calling BASH).
12037      if test "xTR" != xBASH; then
12038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12039$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12040      fi
12041      # Try to locate tool using the code snippet
12042      for ac_prog in tr
12043do
12044  # Extract the first word of "$ac_prog", so it can be a program name with args.
12045set dummy $ac_prog; ac_word=$2
12046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12047$as_echo_n "checking for $ac_word... " >&6; }
12048if ${ac_cv_path_TR+:} false; then :
12049  $as_echo_n "(cached) " >&6
12050else
12051  case $TR in
12052  [\\/]* | ?:[\\/]*)
12053  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12054  ;;
12055  *)
12056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12057for as_dir in $PATH
12058do
12059  IFS=$as_save_IFS
12060  test -z "$as_dir" && as_dir=.
12061    for ac_exec_ext in '' $ac_executable_extensions; do
12062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12063    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12065    break 2
12066  fi
12067done
12068  done
12069IFS=$as_save_IFS
12070
12071  ;;
12072esac
12073fi
12074TR=$ac_cv_path_TR
12075if test -n "$TR"; then
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12077$as_echo "$TR" >&6; }
12078else
12079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12080$as_echo "no" >&6; }
12081fi
12082
12083
12084  test -n "$TR" && break
12085done
12086
12087    else
12088      # If it succeeded, then it was overridden by the user. We will use it
12089      # for the tool.
12090
12091      # First remove it from the list of overridden variables, so we can test
12092      # for unknown variables in the end.
12093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12094
12095      # Check if we try to supply an empty value
12096      if test "x$TR" = x; then
12097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12098$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12100$as_echo_n "checking for TR... " >&6; }
12101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12102$as_echo "disabled" >&6; }
12103      else
12104        # Check if the provided tool contains a complete path.
12105        tool_specified="$TR"
12106        tool_basename="${tool_specified##*/}"
12107        if test "x$tool_basename" = "x$tool_specified"; then
12108          # A command without a complete path is provided, search $PATH.
12109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12110$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12111          # Extract the first word of "$tool_basename", so it can be a program name with args.
12112set dummy $tool_basename; ac_word=$2
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12114$as_echo_n "checking for $ac_word... " >&6; }
12115if ${ac_cv_path_TR+:} false; then :
12116  $as_echo_n "(cached) " >&6
12117else
12118  case $TR in
12119  [\\/]* | ?:[\\/]*)
12120  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12121  ;;
12122  *)
12123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12124for as_dir in $PATH
12125do
12126  IFS=$as_save_IFS
12127  test -z "$as_dir" && as_dir=.
12128    for ac_exec_ext in '' $ac_executable_extensions; do
12129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12130    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12132    break 2
12133  fi
12134done
12135  done
12136IFS=$as_save_IFS
12137
12138  ;;
12139esac
12140fi
12141TR=$ac_cv_path_TR
12142if test -n "$TR"; then
12143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12144$as_echo "$TR" >&6; }
12145else
12146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147$as_echo "no" >&6; }
12148fi
12149
12150
12151          if test "x$TR" = x; then
12152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12153          fi
12154        else
12155          # Otherwise we believe it is a complete path. Use it as it is.
12156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12157$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12159$as_echo_n "checking for TR... " >&6; }
12160          if test ! -x "$tool_specified"; then
12161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12162$as_echo "not found" >&6; }
12163            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12164          fi
12165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12166$as_echo "$tool_specified" >&6; }
12167        fi
12168      fi
12169    fi
12170
12171  fi
12172
12173
12174
12175  if test "x$TR" = x; then
12176    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12177  fi
12178
12179
12180
12181
12182
12183  # Publish this variable in the help.
12184
12185
12186  if [ -z "${UNAME+x}" ]; then
12187    # The variable is not set by user, try to locate tool using the code snippet
12188    for ac_prog in uname
12189do
12190  # Extract the first word of "$ac_prog", so it can be a program name with args.
12191set dummy $ac_prog; ac_word=$2
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12193$as_echo_n "checking for $ac_word... " >&6; }
12194if ${ac_cv_path_UNAME+:} false; then :
12195  $as_echo_n "(cached) " >&6
12196else
12197  case $UNAME in
12198  [\\/]* | ?:[\\/]*)
12199  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12200  ;;
12201  *)
12202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12203for as_dir in $PATH
12204do
12205  IFS=$as_save_IFS
12206  test -z "$as_dir" && as_dir=.
12207    for ac_exec_ext in '' $ac_executable_extensions; do
12208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12209    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12211    break 2
12212  fi
12213done
12214  done
12215IFS=$as_save_IFS
12216
12217  ;;
12218esac
12219fi
12220UNAME=$ac_cv_path_UNAME
12221if test -n "$UNAME"; then
12222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12223$as_echo "$UNAME" >&6; }
12224else
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12226$as_echo "no" >&6; }
12227fi
12228
12229
12230  test -n "$UNAME" && break
12231done
12232
12233  else
12234    # The variable is set, but is it from the command line or the environment?
12235
12236    # Try to remove the string !UNAME! from our list.
12237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12239      # If it failed, the variable was not from the command line. Ignore it,
12240      # but warn the user (except for BASH, which is always set by the calling BASH).
12241      if test "xUNAME" != xBASH; then
12242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12243$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12244      fi
12245      # Try to locate tool using the code snippet
12246      for ac_prog in uname
12247do
12248  # Extract the first word of "$ac_prog", so it can be a program name with args.
12249set dummy $ac_prog; ac_word=$2
12250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12251$as_echo_n "checking for $ac_word... " >&6; }
12252if ${ac_cv_path_UNAME+:} false; then :
12253  $as_echo_n "(cached) " >&6
12254else
12255  case $UNAME in
12256  [\\/]* | ?:[\\/]*)
12257  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12258  ;;
12259  *)
12260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12261for as_dir in $PATH
12262do
12263  IFS=$as_save_IFS
12264  test -z "$as_dir" && as_dir=.
12265    for ac_exec_ext in '' $ac_executable_extensions; do
12266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12267    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12269    break 2
12270  fi
12271done
12272  done
12273IFS=$as_save_IFS
12274
12275  ;;
12276esac
12277fi
12278UNAME=$ac_cv_path_UNAME
12279if test -n "$UNAME"; then
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12281$as_echo "$UNAME" >&6; }
12282else
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12284$as_echo "no" >&6; }
12285fi
12286
12287
12288  test -n "$UNAME" && break
12289done
12290
12291    else
12292      # If it succeeded, then it was overridden by the user. We will use it
12293      # for the tool.
12294
12295      # First remove it from the list of overridden variables, so we can test
12296      # for unknown variables in the end.
12297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12298
12299      # Check if we try to supply an empty value
12300      if test "x$UNAME" = x; then
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12302$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12304$as_echo_n "checking for UNAME... " >&6; }
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12306$as_echo "disabled" >&6; }
12307      else
12308        # Check if the provided tool contains a complete path.
12309        tool_specified="$UNAME"
12310        tool_basename="${tool_specified##*/}"
12311        if test "x$tool_basename" = "x$tool_specified"; then
12312          # A command without a complete path is provided, search $PATH.
12313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12314$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12315          # Extract the first word of "$tool_basename", so it can be a program name with args.
12316set dummy $tool_basename; ac_word=$2
12317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12318$as_echo_n "checking for $ac_word... " >&6; }
12319if ${ac_cv_path_UNAME+:} false; then :
12320  $as_echo_n "(cached) " >&6
12321else
12322  case $UNAME in
12323  [\\/]* | ?:[\\/]*)
12324  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12325  ;;
12326  *)
12327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12328for as_dir in $PATH
12329do
12330  IFS=$as_save_IFS
12331  test -z "$as_dir" && as_dir=.
12332    for ac_exec_ext in '' $ac_executable_extensions; do
12333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12334    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12336    break 2
12337  fi
12338done
12339  done
12340IFS=$as_save_IFS
12341
12342  ;;
12343esac
12344fi
12345UNAME=$ac_cv_path_UNAME
12346if test -n "$UNAME"; then
12347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12348$as_echo "$UNAME" >&6; }
12349else
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
12352fi
12353
12354
12355          if test "x$UNAME" = x; then
12356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12357          fi
12358        else
12359          # Otherwise we believe it is a complete path. Use it as it is.
12360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12361$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12363$as_echo_n "checking for UNAME... " >&6; }
12364          if test ! -x "$tool_specified"; then
12365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12366$as_echo "not found" >&6; }
12367            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12368          fi
12369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12370$as_echo "$tool_specified" >&6; }
12371        fi
12372      fi
12373    fi
12374
12375  fi
12376
12377
12378
12379  if test "x$UNAME" = x; then
12380    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12381  fi
12382
12383
12384
12385
12386
12387  # Publish this variable in the help.
12388
12389
12390  if [ -z "${UNIQ+x}" ]; then
12391    # The variable is not set by user, try to locate tool using the code snippet
12392    for ac_prog in uniq
12393do
12394  # Extract the first word of "$ac_prog", so it can be a program name with args.
12395set dummy $ac_prog; ac_word=$2
12396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12397$as_echo_n "checking for $ac_word... " >&6; }
12398if ${ac_cv_path_UNIQ+:} false; then :
12399  $as_echo_n "(cached) " >&6
12400else
12401  case $UNIQ in
12402  [\\/]* | ?:[\\/]*)
12403  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12404  ;;
12405  *)
12406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12407for as_dir in $PATH
12408do
12409  IFS=$as_save_IFS
12410  test -z "$as_dir" && as_dir=.
12411    for ac_exec_ext in '' $ac_executable_extensions; do
12412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12413    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12415    break 2
12416  fi
12417done
12418  done
12419IFS=$as_save_IFS
12420
12421  ;;
12422esac
12423fi
12424UNIQ=$ac_cv_path_UNIQ
12425if test -n "$UNIQ"; then
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12427$as_echo "$UNIQ" >&6; }
12428else
12429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12430$as_echo "no" >&6; }
12431fi
12432
12433
12434  test -n "$UNIQ" && break
12435done
12436
12437  else
12438    # The variable is set, but is it from the command line or the environment?
12439
12440    # Try to remove the string !UNIQ! from our list.
12441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12443      # If it failed, the variable was not from the command line. Ignore it,
12444      # but warn the user (except for BASH, which is always set by the calling BASH).
12445      if test "xUNIQ" != xBASH; then
12446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12447$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12448      fi
12449      # Try to locate tool using the code snippet
12450      for ac_prog in uniq
12451do
12452  # Extract the first word of "$ac_prog", so it can be a program name with args.
12453set dummy $ac_prog; ac_word=$2
12454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455$as_echo_n "checking for $ac_word... " >&6; }
12456if ${ac_cv_path_UNIQ+:} false; then :
12457  $as_echo_n "(cached) " >&6
12458else
12459  case $UNIQ in
12460  [\\/]* | ?:[\\/]*)
12461  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12462  ;;
12463  *)
12464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465for as_dir in $PATH
12466do
12467  IFS=$as_save_IFS
12468  test -z "$as_dir" && as_dir=.
12469    for ac_exec_ext in '' $ac_executable_extensions; do
12470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12471    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473    break 2
12474  fi
12475done
12476  done
12477IFS=$as_save_IFS
12478
12479  ;;
12480esac
12481fi
12482UNIQ=$ac_cv_path_UNIQ
12483if test -n "$UNIQ"; then
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12485$as_echo "$UNIQ" >&6; }
12486else
12487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
12489fi
12490
12491
12492  test -n "$UNIQ" && break
12493done
12494
12495    else
12496      # If it succeeded, then it was overridden by the user. We will use it
12497      # for the tool.
12498
12499      # First remove it from the list of overridden variables, so we can test
12500      # for unknown variables in the end.
12501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12502
12503      # Check if we try to supply an empty value
12504      if test "x$UNIQ" = x; then
12505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12506$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12508$as_echo_n "checking for UNIQ... " >&6; }
12509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12510$as_echo "disabled" >&6; }
12511      else
12512        # Check if the provided tool contains a complete path.
12513        tool_specified="$UNIQ"
12514        tool_basename="${tool_specified##*/}"
12515        if test "x$tool_basename" = "x$tool_specified"; then
12516          # A command without a complete path is provided, search $PATH.
12517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12518$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12519          # Extract the first word of "$tool_basename", so it can be a program name with args.
12520set dummy $tool_basename; ac_word=$2
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12522$as_echo_n "checking for $ac_word... " >&6; }
12523if ${ac_cv_path_UNIQ+:} false; then :
12524  $as_echo_n "(cached) " >&6
12525else
12526  case $UNIQ in
12527  [\\/]* | ?:[\\/]*)
12528  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12529  ;;
12530  *)
12531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12532for as_dir in $PATH
12533do
12534  IFS=$as_save_IFS
12535  test -z "$as_dir" && as_dir=.
12536    for ac_exec_ext in '' $ac_executable_extensions; do
12537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12538    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12540    break 2
12541  fi
12542done
12543  done
12544IFS=$as_save_IFS
12545
12546  ;;
12547esac
12548fi
12549UNIQ=$ac_cv_path_UNIQ
12550if test -n "$UNIQ"; then
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12552$as_echo "$UNIQ" >&6; }
12553else
12554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12555$as_echo "no" >&6; }
12556fi
12557
12558
12559          if test "x$UNIQ" = x; then
12560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12561          fi
12562        else
12563          # Otherwise we believe it is a complete path. Use it as it is.
12564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12565$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12567$as_echo_n "checking for UNIQ... " >&6; }
12568          if test ! -x "$tool_specified"; then
12569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12570$as_echo "not found" >&6; }
12571            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12572          fi
12573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12574$as_echo "$tool_specified" >&6; }
12575        fi
12576      fi
12577    fi
12578
12579  fi
12580
12581
12582
12583  if test "x$UNIQ" = x; then
12584    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12585  fi
12586
12587
12588
12589
12590
12591  # Publish this variable in the help.
12592
12593
12594  if [ -z "${WC+x}" ]; then
12595    # The variable is not set by user, try to locate tool using the code snippet
12596    for ac_prog in wc
12597do
12598  # Extract the first word of "$ac_prog", so it can be a program name with args.
12599set dummy $ac_prog; ac_word=$2
12600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12601$as_echo_n "checking for $ac_word... " >&6; }
12602if ${ac_cv_path_WC+:} false; then :
12603  $as_echo_n "(cached) " >&6
12604else
12605  case $WC in
12606  [\\/]* | ?:[\\/]*)
12607  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12608  ;;
12609  *)
12610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12611for as_dir in $PATH
12612do
12613  IFS=$as_save_IFS
12614  test -z "$as_dir" && as_dir=.
12615    for ac_exec_ext in '' $ac_executable_extensions; do
12616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12617    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12619    break 2
12620  fi
12621done
12622  done
12623IFS=$as_save_IFS
12624
12625  ;;
12626esac
12627fi
12628WC=$ac_cv_path_WC
12629if test -n "$WC"; then
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12631$as_echo "$WC" >&6; }
12632else
12633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12634$as_echo "no" >&6; }
12635fi
12636
12637
12638  test -n "$WC" && break
12639done
12640
12641  else
12642    # The variable is set, but is it from the command line or the environment?
12643
12644    # Try to remove the string !WC! from our list.
12645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12647      # If it failed, the variable was not from the command line. Ignore it,
12648      # but warn the user (except for BASH, which is always set by the calling BASH).
12649      if test "xWC" != xBASH; then
12650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12651$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12652      fi
12653      # Try to locate tool using the code snippet
12654      for ac_prog in wc
12655do
12656  # Extract the first word of "$ac_prog", so it can be a program name with args.
12657set dummy $ac_prog; ac_word=$2
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12659$as_echo_n "checking for $ac_word... " >&6; }
12660if ${ac_cv_path_WC+:} false; then :
12661  $as_echo_n "(cached) " >&6
12662else
12663  case $WC in
12664  [\\/]* | ?:[\\/]*)
12665  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12666  ;;
12667  *)
12668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12669for as_dir in $PATH
12670do
12671  IFS=$as_save_IFS
12672  test -z "$as_dir" && as_dir=.
12673    for ac_exec_ext in '' $ac_executable_extensions; do
12674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12675    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12677    break 2
12678  fi
12679done
12680  done
12681IFS=$as_save_IFS
12682
12683  ;;
12684esac
12685fi
12686WC=$ac_cv_path_WC
12687if test -n "$WC"; then
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12689$as_echo "$WC" >&6; }
12690else
12691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12692$as_echo "no" >&6; }
12693fi
12694
12695
12696  test -n "$WC" && break
12697done
12698
12699    else
12700      # If it succeeded, then it was overridden by the user. We will use it
12701      # for the tool.
12702
12703      # First remove it from the list of overridden variables, so we can test
12704      # for unknown variables in the end.
12705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12706
12707      # Check if we try to supply an empty value
12708      if test "x$WC" = x; then
12709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12710$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12712$as_echo_n "checking for WC... " >&6; }
12713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12714$as_echo "disabled" >&6; }
12715      else
12716        # Check if the provided tool contains a complete path.
12717        tool_specified="$WC"
12718        tool_basename="${tool_specified##*/}"
12719        if test "x$tool_basename" = "x$tool_specified"; then
12720          # A command without a complete path is provided, search $PATH.
12721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12722$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12723          # Extract the first word of "$tool_basename", so it can be a program name with args.
12724set dummy $tool_basename; ac_word=$2
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12726$as_echo_n "checking for $ac_word... " >&6; }
12727if ${ac_cv_path_WC+:} false; then :
12728  $as_echo_n "(cached) " >&6
12729else
12730  case $WC in
12731  [\\/]* | ?:[\\/]*)
12732  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12733  ;;
12734  *)
12735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12736for as_dir in $PATH
12737do
12738  IFS=$as_save_IFS
12739  test -z "$as_dir" && as_dir=.
12740    for ac_exec_ext in '' $ac_executable_extensions; do
12741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12742    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12744    break 2
12745  fi
12746done
12747  done
12748IFS=$as_save_IFS
12749
12750  ;;
12751esac
12752fi
12753WC=$ac_cv_path_WC
12754if test -n "$WC"; then
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12756$as_echo "$WC" >&6; }
12757else
12758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12759$as_echo "no" >&6; }
12760fi
12761
12762
12763          if test "x$WC" = x; then
12764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12765          fi
12766        else
12767          # Otherwise we believe it is a complete path. Use it as it is.
12768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12769$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12771$as_echo_n "checking for WC... " >&6; }
12772          if test ! -x "$tool_specified"; then
12773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12774$as_echo "not found" >&6; }
12775            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12776          fi
12777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12778$as_echo "$tool_specified" >&6; }
12779        fi
12780      fi
12781    fi
12782
12783  fi
12784
12785
12786
12787  if test "x$WC" = x; then
12788    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12789  fi
12790
12791
12792
12793
12794
12795  # Publish this variable in the help.
12796
12797
12798  if [ -z "${WHICH+x}" ]; then
12799    # The variable is not set by user, try to locate tool using the code snippet
12800    for ac_prog in which
12801do
12802  # Extract the first word of "$ac_prog", so it can be a program name with args.
12803set dummy $ac_prog; ac_word=$2
12804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12805$as_echo_n "checking for $ac_word... " >&6; }
12806if ${ac_cv_path_WHICH+:} false; then :
12807  $as_echo_n "(cached) " >&6
12808else
12809  case $WHICH in
12810  [\\/]* | ?:[\\/]*)
12811  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12812  ;;
12813  *)
12814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12815for as_dir in $PATH
12816do
12817  IFS=$as_save_IFS
12818  test -z "$as_dir" && as_dir=.
12819    for ac_exec_ext in '' $ac_executable_extensions; do
12820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12821    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12823    break 2
12824  fi
12825done
12826  done
12827IFS=$as_save_IFS
12828
12829  ;;
12830esac
12831fi
12832WHICH=$ac_cv_path_WHICH
12833if test -n "$WHICH"; then
12834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12835$as_echo "$WHICH" >&6; }
12836else
12837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12838$as_echo "no" >&6; }
12839fi
12840
12841
12842  test -n "$WHICH" && break
12843done
12844
12845  else
12846    # The variable is set, but is it from the command line or the environment?
12847
12848    # Try to remove the string !WHICH! from our list.
12849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12851      # If it failed, the variable was not from the command line. Ignore it,
12852      # but warn the user (except for BASH, which is always set by the calling BASH).
12853      if test "xWHICH" != xBASH; then
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12855$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12856      fi
12857      # Try to locate tool using the code snippet
12858      for ac_prog in which
12859do
12860  # Extract the first word of "$ac_prog", so it can be a program name with args.
12861set dummy $ac_prog; ac_word=$2
12862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12863$as_echo_n "checking for $ac_word... " >&6; }
12864if ${ac_cv_path_WHICH+:} false; then :
12865  $as_echo_n "(cached) " >&6
12866else
12867  case $WHICH in
12868  [\\/]* | ?:[\\/]*)
12869  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12870  ;;
12871  *)
12872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12873for as_dir in $PATH
12874do
12875  IFS=$as_save_IFS
12876  test -z "$as_dir" && as_dir=.
12877    for ac_exec_ext in '' $ac_executable_extensions; do
12878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12879    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12881    break 2
12882  fi
12883done
12884  done
12885IFS=$as_save_IFS
12886
12887  ;;
12888esac
12889fi
12890WHICH=$ac_cv_path_WHICH
12891if test -n "$WHICH"; then
12892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12893$as_echo "$WHICH" >&6; }
12894else
12895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12896$as_echo "no" >&6; }
12897fi
12898
12899
12900  test -n "$WHICH" && break
12901done
12902
12903    else
12904      # If it succeeded, then it was overridden by the user. We will use it
12905      # for the tool.
12906
12907      # First remove it from the list of overridden variables, so we can test
12908      # for unknown variables in the end.
12909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12910
12911      # Check if we try to supply an empty value
12912      if test "x$WHICH" = x; then
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12914$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12916$as_echo_n "checking for WHICH... " >&6; }
12917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12918$as_echo "disabled" >&6; }
12919      else
12920        # Check if the provided tool contains a complete path.
12921        tool_specified="$WHICH"
12922        tool_basename="${tool_specified##*/}"
12923        if test "x$tool_basename" = "x$tool_specified"; then
12924          # A command without a complete path is provided, search $PATH.
12925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12926$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12927          # Extract the first word of "$tool_basename", so it can be a program name with args.
12928set dummy $tool_basename; ac_word=$2
12929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12930$as_echo_n "checking for $ac_word... " >&6; }
12931if ${ac_cv_path_WHICH+:} false; then :
12932  $as_echo_n "(cached) " >&6
12933else
12934  case $WHICH in
12935  [\\/]* | ?:[\\/]*)
12936  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12937  ;;
12938  *)
12939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12940for as_dir in $PATH
12941do
12942  IFS=$as_save_IFS
12943  test -z "$as_dir" && as_dir=.
12944    for ac_exec_ext in '' $ac_executable_extensions; do
12945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12946    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12948    break 2
12949  fi
12950done
12951  done
12952IFS=$as_save_IFS
12953
12954  ;;
12955esac
12956fi
12957WHICH=$ac_cv_path_WHICH
12958if test -n "$WHICH"; then
12959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12960$as_echo "$WHICH" >&6; }
12961else
12962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12963$as_echo "no" >&6; }
12964fi
12965
12966
12967          if test "x$WHICH" = x; then
12968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12969          fi
12970        else
12971          # Otherwise we believe it is a complete path. Use it as it is.
12972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12973$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12975$as_echo_n "checking for WHICH... " >&6; }
12976          if test ! -x "$tool_specified"; then
12977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12978$as_echo "not found" >&6; }
12979            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12980          fi
12981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12982$as_echo "$tool_specified" >&6; }
12983        fi
12984      fi
12985    fi
12986
12987  fi
12988
12989
12990
12991  if test "x$WHICH" = x; then
12992    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12993  fi
12994
12995
12996
12997
12998
12999  # Publish this variable in the help.
13000
13001
13002  if [ -z "${XARGS+x}" ]; then
13003    # The variable is not set by user, try to locate tool using the code snippet
13004    for ac_prog in xargs
13005do
13006  # Extract the first word of "$ac_prog", so it can be a program name with args.
13007set dummy $ac_prog; ac_word=$2
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13009$as_echo_n "checking for $ac_word... " >&6; }
13010if ${ac_cv_path_XARGS+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  case $XARGS in
13014  [\\/]* | ?:[\\/]*)
13015  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13016  ;;
13017  *)
13018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  test -z "$as_dir" && as_dir=.
13023    for ac_exec_ext in '' $ac_executable_extensions; do
13024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13025    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13027    break 2
13028  fi
13029done
13030  done
13031IFS=$as_save_IFS
13032
13033  ;;
13034esac
13035fi
13036XARGS=$ac_cv_path_XARGS
13037if test -n "$XARGS"; then
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13039$as_echo "$XARGS" >&6; }
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044
13045
13046  test -n "$XARGS" && break
13047done
13048
13049  else
13050    # The variable is set, but is it from the command line or the environment?
13051
13052    # Try to remove the string !XARGS! from our list.
13053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13055      # If it failed, the variable was not from the command line. Ignore it,
13056      # but warn the user (except for BASH, which is always set by the calling BASH).
13057      if test "xXARGS" != xBASH; then
13058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13059$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13060      fi
13061      # Try to locate tool using the code snippet
13062      for ac_prog in xargs
13063do
13064  # Extract the first word of "$ac_prog", so it can be a program name with args.
13065set dummy $ac_prog; ac_word=$2
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067$as_echo_n "checking for $ac_word... " >&6; }
13068if ${ac_cv_path_XARGS+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $XARGS in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
13079  IFS=$as_save_IFS
13080  test -z "$as_dir" && as_dir=.
13081    for ac_exec_ext in '' $ac_executable_extensions; do
13082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085    break 2
13086  fi
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094XARGS=$ac_cv_path_XARGS
13095if test -n "$XARGS"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13097$as_echo "$XARGS" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104  test -n "$XARGS" && break
13105done
13106
13107    else
13108      # If it succeeded, then it was overridden by the user. We will use it
13109      # for the tool.
13110
13111      # First remove it from the list of overridden variables, so we can test
13112      # for unknown variables in the end.
13113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13114
13115      # Check if we try to supply an empty value
13116      if test "x$XARGS" = x; then
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13118$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13120$as_echo_n "checking for XARGS... " >&6; }
13121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13122$as_echo "disabled" >&6; }
13123      else
13124        # Check if the provided tool contains a complete path.
13125        tool_specified="$XARGS"
13126        tool_basename="${tool_specified##*/}"
13127        if test "x$tool_basename" = "x$tool_specified"; then
13128          # A command without a complete path is provided, search $PATH.
13129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13130$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13131          # Extract the first word of "$tool_basename", so it can be a program name with args.
13132set dummy $tool_basename; ac_word=$2
13133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13134$as_echo_n "checking for $ac_word... " >&6; }
13135if ${ac_cv_path_XARGS+:} false; then :
13136  $as_echo_n "(cached) " >&6
13137else
13138  case $XARGS in
13139  [\\/]* | ?:[\\/]*)
13140  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13141  ;;
13142  *)
13143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13144for as_dir in $PATH
13145do
13146  IFS=$as_save_IFS
13147  test -z "$as_dir" && as_dir=.
13148    for ac_exec_ext in '' $ac_executable_extensions; do
13149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13150    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13152    break 2
13153  fi
13154done
13155  done
13156IFS=$as_save_IFS
13157
13158  ;;
13159esac
13160fi
13161XARGS=$ac_cv_path_XARGS
13162if test -n "$XARGS"; then
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13164$as_echo "$XARGS" >&6; }
13165else
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13167$as_echo "no" >&6; }
13168fi
13169
13170
13171          if test "x$XARGS" = x; then
13172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13173          fi
13174        else
13175          # Otherwise we believe it is a complete path. Use it as it is.
13176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13177$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13179$as_echo_n "checking for XARGS... " >&6; }
13180          if test ! -x "$tool_specified"; then
13181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13182$as_echo "not found" >&6; }
13183            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13184          fi
13185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13186$as_echo "$tool_specified" >&6; }
13187        fi
13188      fi
13189    fi
13190
13191  fi
13192
13193
13194
13195  if test "x$XARGS" = x; then
13196    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13197  fi
13198
13199
13200
13201  # Then required tools that require some special treatment.
13202
13203
13204  # Publish this variable in the help.
13205
13206
13207  if [ -z "${AWK+x}" ]; then
13208    # The variable is not set by user, try to locate tool using the code snippet
13209    for ac_prog in gawk mawk nawk awk
13210do
13211  # Extract the first word of "$ac_prog", so it can be a program name with args.
13212set dummy $ac_prog; ac_word=$2
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13214$as_echo_n "checking for $ac_word... " >&6; }
13215if ${ac_cv_prog_AWK+:} false; then :
13216  $as_echo_n "(cached) " >&6
13217else
13218  if test -n "$AWK"; then
13219  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13220else
13221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13222for as_dir in $PATH
13223do
13224  IFS=$as_save_IFS
13225  test -z "$as_dir" && as_dir=.
13226    for ac_exec_ext in '' $ac_executable_extensions; do
13227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13228    ac_cv_prog_AWK="$ac_prog"
13229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13230    break 2
13231  fi
13232done
13233  done
13234IFS=$as_save_IFS
13235
13236fi
13237fi
13238AWK=$ac_cv_prog_AWK
13239if test -n "$AWK"; then
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13241$as_echo "$AWK" >&6; }
13242else
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13244$as_echo "no" >&6; }
13245fi
13246
13247
13248  test -n "$AWK" && break
13249done
13250
13251  else
13252    # The variable is set, but is it from the command line or the environment?
13253
13254    # Try to remove the string !AWK! from our list.
13255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13257      # If it failed, the variable was not from the command line. Ignore it,
13258      # but warn the user (except for BASH, which is always set by the calling BASH).
13259      if test "xAWK" != xBASH; then
13260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13261$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13262      fi
13263      # Try to locate tool using the code snippet
13264      for ac_prog in gawk mawk nawk awk
13265do
13266  # Extract the first word of "$ac_prog", so it can be a program name with args.
13267set dummy $ac_prog; ac_word=$2
13268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13269$as_echo_n "checking for $ac_word... " >&6; }
13270if ${ac_cv_prog_AWK+:} false; then :
13271  $as_echo_n "(cached) " >&6
13272else
13273  if test -n "$AWK"; then
13274  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13275else
13276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13277for as_dir in $PATH
13278do
13279  IFS=$as_save_IFS
13280  test -z "$as_dir" && as_dir=.
13281    for ac_exec_ext in '' $ac_executable_extensions; do
13282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13283    ac_cv_prog_AWK="$ac_prog"
13284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13285    break 2
13286  fi
13287done
13288  done
13289IFS=$as_save_IFS
13290
13291fi
13292fi
13293AWK=$ac_cv_prog_AWK
13294if test -n "$AWK"; then
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13296$as_echo "$AWK" >&6; }
13297else
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299$as_echo "no" >&6; }
13300fi
13301
13302
13303  test -n "$AWK" && break
13304done
13305
13306    else
13307      # If it succeeded, then it was overridden by the user. We will use it
13308      # for the tool.
13309
13310      # First remove it from the list of overridden variables, so we can test
13311      # for unknown variables in the end.
13312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13313
13314      # Check if we try to supply an empty value
13315      if test "x$AWK" = x; then
13316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13317$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13319$as_echo_n "checking for AWK... " >&6; }
13320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13321$as_echo "disabled" >&6; }
13322      else
13323        # Check if the provided tool contains a complete path.
13324        tool_specified="$AWK"
13325        tool_basename="${tool_specified##*/}"
13326        if test "x$tool_basename" = "x$tool_specified"; then
13327          # A command without a complete path is provided, search $PATH.
13328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13329$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13330          # Extract the first word of "$tool_basename", so it can be a program name with args.
13331set dummy $tool_basename; ac_word=$2
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13333$as_echo_n "checking for $ac_word... " >&6; }
13334if ${ac_cv_path_AWK+:} false; then :
13335  $as_echo_n "(cached) " >&6
13336else
13337  case $AWK in
13338  [\\/]* | ?:[\\/]*)
13339  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13340  ;;
13341  *)
13342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13343for as_dir in $PATH
13344do
13345  IFS=$as_save_IFS
13346  test -z "$as_dir" && as_dir=.
13347    for ac_exec_ext in '' $ac_executable_extensions; do
13348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13349    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13351    break 2
13352  fi
13353done
13354  done
13355IFS=$as_save_IFS
13356
13357  ;;
13358esac
13359fi
13360AWK=$ac_cv_path_AWK
13361if test -n "$AWK"; then
13362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13363$as_echo "$AWK" >&6; }
13364else
13365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13366$as_echo "no" >&6; }
13367fi
13368
13369
13370          if test "x$AWK" = x; then
13371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13372          fi
13373        else
13374          # Otherwise we believe it is a complete path. Use it as it is.
13375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13376$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13378$as_echo_n "checking for AWK... " >&6; }
13379          if test ! -x "$tool_specified"; then
13380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13381$as_echo "not found" >&6; }
13382            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13383          fi
13384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13385$as_echo "$tool_specified" >&6; }
13386        fi
13387      fi
13388    fi
13389
13390  fi
13391
13392
13393  if test "x$AWK" = x; then
13394    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13395  fi
13396
13397
13398
13399
13400  # Publish this variable in the help.
13401
13402
13403  if [ -z "${GREP+x}" ]; then
13404    # The variable is not set by user, try to locate tool using the code snippet
13405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13406$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13407if ${ac_cv_path_GREP+:} false; then :
13408  $as_echo_n "(cached) " >&6
13409else
13410  if test -z "$GREP"; then
13411  ac_path_GREP_found=false
13412  # Loop through the user's path and test for each of PROGNAME-LIST
13413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13414for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13415do
13416  IFS=$as_save_IFS
13417  test -z "$as_dir" && as_dir=.
13418    for ac_prog in grep ggrep; do
13419    for ac_exec_ext in '' $ac_executable_extensions; do
13420      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13421      as_fn_executable_p "$ac_path_GREP" || continue
13422# Check for GNU ac_path_GREP and select it if it is found.
13423  # Check for GNU $ac_path_GREP
13424case `"$ac_path_GREP" --version 2>&1` in
13425*GNU*)
13426  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13427*)
13428  ac_count=0
13429  $as_echo_n 0123456789 >"conftest.in"
13430  while :
13431  do
13432    cat "conftest.in" "conftest.in" >"conftest.tmp"
13433    mv "conftest.tmp" "conftest.in"
13434    cp "conftest.in" "conftest.nl"
13435    $as_echo 'GREP' >> "conftest.nl"
13436    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13437    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13438    as_fn_arith $ac_count + 1 && ac_count=$as_val
13439    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13440      # Best one so far, save it but keep looking for a better one
13441      ac_cv_path_GREP="$ac_path_GREP"
13442      ac_path_GREP_max=$ac_count
13443    fi
13444    # 10*(2^10) chars as input seems more than enough
13445    test $ac_count -gt 10 && break
13446  done
13447  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13448esac
13449
13450      $ac_path_GREP_found && break 3
13451    done
13452  done
13453  done
13454IFS=$as_save_IFS
13455  if test -z "$ac_cv_path_GREP"; then
13456    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13457  fi
13458else
13459  ac_cv_path_GREP=$GREP
13460fi
13461
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13464$as_echo "$ac_cv_path_GREP" >&6; }
13465 GREP="$ac_cv_path_GREP"
13466
13467
13468  else
13469    # The variable is set, but is it from the command line or the environment?
13470
13471    # Try to remove the string !GREP! from our list.
13472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13474      # If it failed, the variable was not from the command line. Ignore it,
13475      # but warn the user (except for BASH, which is always set by the calling BASH).
13476      if test "xGREP" != xBASH; then
13477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13478$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13479      fi
13480      # Try to locate tool using the code snippet
13481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13482$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13483if ${ac_cv_path_GREP+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  if test -z "$GREP"; then
13487  ac_path_GREP_found=false
13488  # Loop through the user's path and test for each of PROGNAME-LIST
13489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13490for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13491do
13492  IFS=$as_save_IFS
13493  test -z "$as_dir" && as_dir=.
13494    for ac_prog in grep ggrep; do
13495    for ac_exec_ext in '' $ac_executable_extensions; do
13496      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13497      as_fn_executable_p "$ac_path_GREP" || continue
13498# Check for GNU ac_path_GREP and select it if it is found.
13499  # Check for GNU $ac_path_GREP
13500case `"$ac_path_GREP" --version 2>&1` in
13501*GNU*)
13502  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13503*)
13504  ac_count=0
13505  $as_echo_n 0123456789 >"conftest.in"
13506  while :
13507  do
13508    cat "conftest.in" "conftest.in" >"conftest.tmp"
13509    mv "conftest.tmp" "conftest.in"
13510    cp "conftest.in" "conftest.nl"
13511    $as_echo 'GREP' >> "conftest.nl"
13512    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13513    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13514    as_fn_arith $ac_count + 1 && ac_count=$as_val
13515    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13516      # Best one so far, save it but keep looking for a better one
13517      ac_cv_path_GREP="$ac_path_GREP"
13518      ac_path_GREP_max=$ac_count
13519    fi
13520    # 10*(2^10) chars as input seems more than enough
13521    test $ac_count -gt 10 && break
13522  done
13523  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13524esac
13525
13526      $ac_path_GREP_found && break 3
13527    done
13528  done
13529  done
13530IFS=$as_save_IFS
13531  if test -z "$ac_cv_path_GREP"; then
13532    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13533  fi
13534else
13535  ac_cv_path_GREP=$GREP
13536fi
13537
13538fi
13539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13540$as_echo "$ac_cv_path_GREP" >&6; }
13541 GREP="$ac_cv_path_GREP"
13542
13543
13544    else
13545      # If it succeeded, then it was overridden by the user. We will use it
13546      # for the tool.
13547
13548      # First remove it from the list of overridden variables, so we can test
13549      # for unknown variables in the end.
13550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13551
13552      # Check if we try to supply an empty value
13553      if test "x$GREP" = x; then
13554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13555$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13557$as_echo_n "checking for GREP... " >&6; }
13558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13559$as_echo "disabled" >&6; }
13560      else
13561        # Check if the provided tool contains a complete path.
13562        tool_specified="$GREP"
13563        tool_basename="${tool_specified##*/}"
13564        if test "x$tool_basename" = "x$tool_specified"; then
13565          # A command without a complete path is provided, search $PATH.
13566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13567$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13568          # Extract the first word of "$tool_basename", so it can be a program name with args.
13569set dummy $tool_basename; ac_word=$2
13570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13571$as_echo_n "checking for $ac_word... " >&6; }
13572if ${ac_cv_path_GREP+:} false; then :
13573  $as_echo_n "(cached) " >&6
13574else
13575  case $GREP in
13576  [\\/]* | ?:[\\/]*)
13577  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13578  ;;
13579  *)
13580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13581for as_dir in $PATH
13582do
13583  IFS=$as_save_IFS
13584  test -z "$as_dir" && as_dir=.
13585    for ac_exec_ext in '' $ac_executable_extensions; do
13586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13587    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13589    break 2
13590  fi
13591done
13592  done
13593IFS=$as_save_IFS
13594
13595  ;;
13596esac
13597fi
13598GREP=$ac_cv_path_GREP
13599if test -n "$GREP"; then
13600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13601$as_echo "$GREP" >&6; }
13602else
13603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13604$as_echo "no" >&6; }
13605fi
13606
13607
13608          if test "x$GREP" = x; then
13609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13610          fi
13611        else
13612          # Otherwise we believe it is a complete path. Use it as it is.
13613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13614$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13616$as_echo_n "checking for GREP... " >&6; }
13617          if test ! -x "$tool_specified"; then
13618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13619$as_echo "not found" >&6; }
13620            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13621          fi
13622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13623$as_echo "$tool_specified" >&6; }
13624        fi
13625      fi
13626    fi
13627
13628  fi
13629
13630
13631  if test "x$GREP" = x; then
13632    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13633  fi
13634
13635
13636
13637
13638  # Publish this variable in the help.
13639
13640
13641  if [ -z "${EGREP+x}" ]; then
13642    # The variable is not set by user, try to locate tool using the code snippet
13643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13644$as_echo_n "checking for egrep... " >&6; }
13645if ${ac_cv_path_EGREP+:} false; then :
13646  $as_echo_n "(cached) " >&6
13647else
13648  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13649   then ac_cv_path_EGREP="$GREP -E"
13650   else
13651     if test -z "$EGREP"; then
13652  ac_path_EGREP_found=false
13653  # Loop through the user's path and test for each of PROGNAME-LIST
13654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13656do
13657  IFS=$as_save_IFS
13658  test -z "$as_dir" && as_dir=.
13659    for ac_prog in egrep; do
13660    for ac_exec_ext in '' $ac_executable_extensions; do
13661      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13662      as_fn_executable_p "$ac_path_EGREP" || continue
13663# Check for GNU ac_path_EGREP and select it if it is found.
13664  # Check for GNU $ac_path_EGREP
13665case `"$ac_path_EGREP" --version 2>&1` in
13666*GNU*)
13667  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13668*)
13669  ac_count=0
13670  $as_echo_n 0123456789 >"conftest.in"
13671  while :
13672  do
13673    cat "conftest.in" "conftest.in" >"conftest.tmp"
13674    mv "conftest.tmp" "conftest.in"
13675    cp "conftest.in" "conftest.nl"
13676    $as_echo 'EGREP' >> "conftest.nl"
13677    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13678    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13679    as_fn_arith $ac_count + 1 && ac_count=$as_val
13680    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13681      # Best one so far, save it but keep looking for a better one
13682      ac_cv_path_EGREP="$ac_path_EGREP"
13683      ac_path_EGREP_max=$ac_count
13684    fi
13685    # 10*(2^10) chars as input seems more than enough
13686    test $ac_count -gt 10 && break
13687  done
13688  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13689esac
13690
13691      $ac_path_EGREP_found && break 3
13692    done
13693  done
13694  done
13695IFS=$as_save_IFS
13696  if test -z "$ac_cv_path_EGREP"; then
13697    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13698  fi
13699else
13700  ac_cv_path_EGREP=$EGREP
13701fi
13702
13703   fi
13704fi
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13706$as_echo "$ac_cv_path_EGREP" >&6; }
13707 EGREP="$ac_cv_path_EGREP"
13708
13709
13710  else
13711    # The variable is set, but is it from the command line or the environment?
13712
13713    # Try to remove the string !EGREP! from our list.
13714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13716      # If it failed, the variable was not from the command line. Ignore it,
13717      # but warn the user (except for BASH, which is always set by the calling BASH).
13718      if test "xEGREP" != xBASH; then
13719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13720$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13721      fi
13722      # Try to locate tool using the code snippet
13723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13724$as_echo_n "checking for egrep... " >&6; }
13725if ${ac_cv_path_EGREP+:} false; then :
13726  $as_echo_n "(cached) " >&6
13727else
13728  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13729   then ac_cv_path_EGREP="$GREP -E"
13730   else
13731     if test -z "$EGREP"; then
13732  ac_path_EGREP_found=false
13733  # Loop through the user's path and test for each of PROGNAME-LIST
13734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13735for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13736do
13737  IFS=$as_save_IFS
13738  test -z "$as_dir" && as_dir=.
13739    for ac_prog in egrep; do
13740    for ac_exec_ext in '' $ac_executable_extensions; do
13741      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13742      as_fn_executable_p "$ac_path_EGREP" || continue
13743# Check for GNU ac_path_EGREP and select it if it is found.
13744  # Check for GNU $ac_path_EGREP
13745case `"$ac_path_EGREP" --version 2>&1` in
13746*GNU*)
13747  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13748*)
13749  ac_count=0
13750  $as_echo_n 0123456789 >"conftest.in"
13751  while :
13752  do
13753    cat "conftest.in" "conftest.in" >"conftest.tmp"
13754    mv "conftest.tmp" "conftest.in"
13755    cp "conftest.in" "conftest.nl"
13756    $as_echo 'EGREP' >> "conftest.nl"
13757    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13758    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13759    as_fn_arith $ac_count + 1 && ac_count=$as_val
13760    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13761      # Best one so far, save it but keep looking for a better one
13762      ac_cv_path_EGREP="$ac_path_EGREP"
13763      ac_path_EGREP_max=$ac_count
13764    fi
13765    # 10*(2^10) chars as input seems more than enough
13766    test $ac_count -gt 10 && break
13767  done
13768  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13769esac
13770
13771      $ac_path_EGREP_found && break 3
13772    done
13773  done
13774  done
13775IFS=$as_save_IFS
13776  if test -z "$ac_cv_path_EGREP"; then
13777    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13778  fi
13779else
13780  ac_cv_path_EGREP=$EGREP
13781fi
13782
13783   fi
13784fi
13785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13786$as_echo "$ac_cv_path_EGREP" >&6; }
13787 EGREP="$ac_cv_path_EGREP"
13788
13789
13790    else
13791      # If it succeeded, then it was overridden by the user. We will use it
13792      # for the tool.
13793
13794      # First remove it from the list of overridden variables, so we can test
13795      # for unknown variables in the end.
13796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13797
13798      # Check if we try to supply an empty value
13799      if test "x$EGREP" = x; then
13800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13801$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13803$as_echo_n "checking for EGREP... " >&6; }
13804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13805$as_echo "disabled" >&6; }
13806      else
13807        # Check if the provided tool contains a complete path.
13808        tool_specified="$EGREP"
13809        tool_basename="${tool_specified##*/}"
13810        if test "x$tool_basename" = "x$tool_specified"; then
13811          # A command without a complete path is provided, search $PATH.
13812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13813$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13814          # Extract the first word of "$tool_basename", so it can be a program name with args.
13815set dummy $tool_basename; ac_word=$2
13816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13817$as_echo_n "checking for $ac_word... " >&6; }
13818if ${ac_cv_path_EGREP+:} false; then :
13819  $as_echo_n "(cached) " >&6
13820else
13821  case $EGREP in
13822  [\\/]* | ?:[\\/]*)
13823  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13824  ;;
13825  *)
13826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13827for as_dir in $PATH
13828do
13829  IFS=$as_save_IFS
13830  test -z "$as_dir" && as_dir=.
13831    for ac_exec_ext in '' $ac_executable_extensions; do
13832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13833    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13835    break 2
13836  fi
13837done
13838  done
13839IFS=$as_save_IFS
13840
13841  ;;
13842esac
13843fi
13844EGREP=$ac_cv_path_EGREP
13845if test -n "$EGREP"; then
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13847$as_echo "$EGREP" >&6; }
13848else
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13850$as_echo "no" >&6; }
13851fi
13852
13853
13854          if test "x$EGREP" = x; then
13855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13856          fi
13857        else
13858          # Otherwise we believe it is a complete path. Use it as it is.
13859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13860$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13862$as_echo_n "checking for EGREP... " >&6; }
13863          if test ! -x "$tool_specified"; then
13864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13865$as_echo "not found" >&6; }
13866            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13867          fi
13868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13869$as_echo "$tool_specified" >&6; }
13870        fi
13871      fi
13872    fi
13873
13874  fi
13875
13876
13877  if test "x$EGREP" = x; then
13878    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13879  fi
13880
13881
13882
13883
13884  # Publish this variable in the help.
13885
13886
13887  if [ -z "${FGREP+x}" ]; then
13888    # The variable is not set by user, try to locate tool using the code snippet
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13890$as_echo_n "checking for fgrep... " >&6; }
13891if ${ac_cv_path_FGREP+:} false; then :
13892  $as_echo_n "(cached) " >&6
13893else
13894  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13895   then ac_cv_path_FGREP="$GREP -F"
13896   else
13897     if test -z "$FGREP"; then
13898  ac_path_FGREP_found=false
13899  # Loop through the user's path and test for each of PROGNAME-LIST
13900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13901for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13902do
13903  IFS=$as_save_IFS
13904  test -z "$as_dir" && as_dir=.
13905    for ac_prog in fgrep; do
13906    for ac_exec_ext in '' $ac_executable_extensions; do
13907      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13908      as_fn_executable_p "$ac_path_FGREP" || continue
13909# Check for GNU ac_path_FGREP and select it if it is found.
13910  # Check for GNU $ac_path_FGREP
13911case `"$ac_path_FGREP" --version 2>&1` in
13912*GNU*)
13913  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13914*)
13915  ac_count=0
13916  $as_echo_n 0123456789 >"conftest.in"
13917  while :
13918  do
13919    cat "conftest.in" "conftest.in" >"conftest.tmp"
13920    mv "conftest.tmp" "conftest.in"
13921    cp "conftest.in" "conftest.nl"
13922    $as_echo 'FGREP' >> "conftest.nl"
13923    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13924    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13925    as_fn_arith $ac_count + 1 && ac_count=$as_val
13926    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13927      # Best one so far, save it but keep looking for a better one
13928      ac_cv_path_FGREP="$ac_path_FGREP"
13929      ac_path_FGREP_max=$ac_count
13930    fi
13931    # 10*(2^10) chars as input seems more than enough
13932    test $ac_count -gt 10 && break
13933  done
13934  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13935esac
13936
13937      $ac_path_FGREP_found && break 3
13938    done
13939  done
13940  done
13941IFS=$as_save_IFS
13942  if test -z "$ac_cv_path_FGREP"; then
13943    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13944  fi
13945else
13946  ac_cv_path_FGREP=$FGREP
13947fi
13948
13949   fi
13950fi
13951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13952$as_echo "$ac_cv_path_FGREP" >&6; }
13953 FGREP="$ac_cv_path_FGREP"
13954
13955
13956  else
13957    # The variable is set, but is it from the command line or the environment?
13958
13959    # Try to remove the string !FGREP! from our list.
13960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13962      # If it failed, the variable was not from the command line. Ignore it,
13963      # but warn the user (except for BASH, which is always set by the calling BASH).
13964      if test "xFGREP" != xBASH; then
13965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13966$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13967      fi
13968      # Try to locate tool using the code snippet
13969      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13970$as_echo_n "checking for fgrep... " >&6; }
13971if ${ac_cv_path_FGREP+:} false; then :
13972  $as_echo_n "(cached) " >&6
13973else
13974  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13975   then ac_cv_path_FGREP="$GREP -F"
13976   else
13977     if test -z "$FGREP"; then
13978  ac_path_FGREP_found=false
13979  # Loop through the user's path and test for each of PROGNAME-LIST
13980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13981for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13982do
13983  IFS=$as_save_IFS
13984  test -z "$as_dir" && as_dir=.
13985    for ac_prog in fgrep; do
13986    for ac_exec_ext in '' $ac_executable_extensions; do
13987      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13988      as_fn_executable_p "$ac_path_FGREP" || continue
13989# Check for GNU ac_path_FGREP and select it if it is found.
13990  # Check for GNU $ac_path_FGREP
13991case `"$ac_path_FGREP" --version 2>&1` in
13992*GNU*)
13993  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13994*)
13995  ac_count=0
13996  $as_echo_n 0123456789 >"conftest.in"
13997  while :
13998  do
13999    cat "conftest.in" "conftest.in" >"conftest.tmp"
14000    mv "conftest.tmp" "conftest.in"
14001    cp "conftest.in" "conftest.nl"
14002    $as_echo 'FGREP' >> "conftest.nl"
14003    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14004    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14005    as_fn_arith $ac_count + 1 && ac_count=$as_val
14006    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14007      # Best one so far, save it but keep looking for a better one
14008      ac_cv_path_FGREP="$ac_path_FGREP"
14009      ac_path_FGREP_max=$ac_count
14010    fi
14011    # 10*(2^10) chars as input seems more than enough
14012    test $ac_count -gt 10 && break
14013  done
14014  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14015esac
14016
14017      $ac_path_FGREP_found && break 3
14018    done
14019  done
14020  done
14021IFS=$as_save_IFS
14022  if test -z "$ac_cv_path_FGREP"; then
14023    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14024  fi
14025else
14026  ac_cv_path_FGREP=$FGREP
14027fi
14028
14029   fi
14030fi
14031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14032$as_echo "$ac_cv_path_FGREP" >&6; }
14033 FGREP="$ac_cv_path_FGREP"
14034
14035
14036    else
14037      # If it succeeded, then it was overridden by the user. We will use it
14038      # for the tool.
14039
14040      # First remove it from the list of overridden variables, so we can test
14041      # for unknown variables in the end.
14042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14043
14044      # Check if we try to supply an empty value
14045      if test "x$FGREP" = x; then
14046        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14047$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14049$as_echo_n "checking for FGREP... " >&6; }
14050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14051$as_echo "disabled" >&6; }
14052      else
14053        # Check if the provided tool contains a complete path.
14054        tool_specified="$FGREP"
14055        tool_basename="${tool_specified##*/}"
14056        if test "x$tool_basename" = "x$tool_specified"; then
14057          # A command without a complete path is provided, search $PATH.
14058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14059$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14060          # Extract the first word of "$tool_basename", so it can be a program name with args.
14061set dummy $tool_basename; ac_word=$2
14062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14063$as_echo_n "checking for $ac_word... " >&6; }
14064if ${ac_cv_path_FGREP+:} false; then :
14065  $as_echo_n "(cached) " >&6
14066else
14067  case $FGREP in
14068  [\\/]* | ?:[\\/]*)
14069  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14070  ;;
14071  *)
14072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14073for as_dir in $PATH
14074do
14075  IFS=$as_save_IFS
14076  test -z "$as_dir" && as_dir=.
14077    for ac_exec_ext in '' $ac_executable_extensions; do
14078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14079    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14081    break 2
14082  fi
14083done
14084  done
14085IFS=$as_save_IFS
14086
14087  ;;
14088esac
14089fi
14090FGREP=$ac_cv_path_FGREP
14091if test -n "$FGREP"; then
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14093$as_echo "$FGREP" >&6; }
14094else
14095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14096$as_echo "no" >&6; }
14097fi
14098
14099
14100          if test "x$FGREP" = x; then
14101            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14102          fi
14103        else
14104          # Otherwise we believe it is a complete path. Use it as it is.
14105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14106$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14107          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14108$as_echo_n "checking for FGREP... " >&6; }
14109          if test ! -x "$tool_specified"; then
14110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14111$as_echo "not found" >&6; }
14112            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14113          fi
14114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14115$as_echo "$tool_specified" >&6; }
14116        fi
14117      fi
14118    fi
14119
14120  fi
14121
14122
14123  if test "x$FGREP" = x; then
14124    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14125  fi
14126
14127
14128
14129
14130  # Publish this variable in the help.
14131
14132
14133  if [ -z "${SED+x}" ]; then
14134    # The variable is not set by user, try to locate tool using the code snippet
14135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14136$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14137if ${ac_cv_path_SED+:} false; then :
14138  $as_echo_n "(cached) " >&6
14139else
14140            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14141     for ac_i in 1 2 3 4 5 6 7; do
14142       ac_script="$ac_script$as_nl$ac_script"
14143     done
14144     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14145     { ac_script=; unset ac_script;}
14146     if test -z "$SED"; then
14147  ac_path_SED_found=false
14148  # Loop through the user's path and test for each of PROGNAME-LIST
14149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14150for as_dir in $PATH
14151do
14152  IFS=$as_save_IFS
14153  test -z "$as_dir" && as_dir=.
14154    for ac_prog in sed gsed; do
14155    for ac_exec_ext in '' $ac_executable_extensions; do
14156      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14157      as_fn_executable_p "$ac_path_SED" || continue
14158# Check for GNU ac_path_SED and select it if it is found.
14159  # Check for GNU $ac_path_SED
14160case `"$ac_path_SED" --version 2>&1` in
14161*GNU*)
14162  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14163*)
14164  ac_count=0
14165  $as_echo_n 0123456789 >"conftest.in"
14166  while :
14167  do
14168    cat "conftest.in" "conftest.in" >"conftest.tmp"
14169    mv "conftest.tmp" "conftest.in"
14170    cp "conftest.in" "conftest.nl"
14171    $as_echo '' >> "conftest.nl"
14172    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14173    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14174    as_fn_arith $ac_count + 1 && ac_count=$as_val
14175    if test $ac_count -gt ${ac_path_SED_max-0}; then
14176      # Best one so far, save it but keep looking for a better one
14177      ac_cv_path_SED="$ac_path_SED"
14178      ac_path_SED_max=$ac_count
14179    fi
14180    # 10*(2^10) chars as input seems more than enough
14181    test $ac_count -gt 10 && break
14182  done
14183  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14184esac
14185
14186      $ac_path_SED_found && break 3
14187    done
14188  done
14189  done
14190IFS=$as_save_IFS
14191  if test -z "$ac_cv_path_SED"; then
14192    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14193  fi
14194else
14195  ac_cv_path_SED=$SED
14196fi
14197
14198fi
14199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14200$as_echo "$ac_cv_path_SED" >&6; }
14201 SED="$ac_cv_path_SED"
14202  rm -f conftest.sed
14203
14204  else
14205    # The variable is set, but is it from the command line or the environment?
14206
14207    # Try to remove the string !SED! from our list.
14208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14210      # If it failed, the variable was not from the command line. Ignore it,
14211      # but warn the user (except for BASH, which is always set by the calling BASH).
14212      if test "xSED" != xBASH; then
14213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14214$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14215      fi
14216      # Try to locate tool using the code snippet
14217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14218$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14219if ${ac_cv_path_SED+:} false; then :
14220  $as_echo_n "(cached) " >&6
14221else
14222            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14223     for ac_i in 1 2 3 4 5 6 7; do
14224       ac_script="$ac_script$as_nl$ac_script"
14225     done
14226     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14227     { ac_script=; unset ac_script;}
14228     if test -z "$SED"; then
14229  ac_path_SED_found=false
14230  # Loop through the user's path and test for each of PROGNAME-LIST
14231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14232for as_dir in $PATH
14233do
14234  IFS=$as_save_IFS
14235  test -z "$as_dir" && as_dir=.
14236    for ac_prog in sed gsed; do
14237    for ac_exec_ext in '' $ac_executable_extensions; do
14238      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14239      as_fn_executable_p "$ac_path_SED" || continue
14240# Check for GNU ac_path_SED and select it if it is found.
14241  # Check for GNU $ac_path_SED
14242case `"$ac_path_SED" --version 2>&1` in
14243*GNU*)
14244  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14245*)
14246  ac_count=0
14247  $as_echo_n 0123456789 >"conftest.in"
14248  while :
14249  do
14250    cat "conftest.in" "conftest.in" >"conftest.tmp"
14251    mv "conftest.tmp" "conftest.in"
14252    cp "conftest.in" "conftest.nl"
14253    $as_echo '' >> "conftest.nl"
14254    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14255    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14256    as_fn_arith $ac_count + 1 && ac_count=$as_val
14257    if test $ac_count -gt ${ac_path_SED_max-0}; then
14258      # Best one so far, save it but keep looking for a better one
14259      ac_cv_path_SED="$ac_path_SED"
14260      ac_path_SED_max=$ac_count
14261    fi
14262    # 10*(2^10) chars as input seems more than enough
14263    test $ac_count -gt 10 && break
14264  done
14265  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14266esac
14267
14268      $ac_path_SED_found && break 3
14269    done
14270  done
14271  done
14272IFS=$as_save_IFS
14273  if test -z "$ac_cv_path_SED"; then
14274    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14275  fi
14276else
14277  ac_cv_path_SED=$SED
14278fi
14279
14280fi
14281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14282$as_echo "$ac_cv_path_SED" >&6; }
14283 SED="$ac_cv_path_SED"
14284  rm -f conftest.sed
14285
14286    else
14287      # If it succeeded, then it was overridden by the user. We will use it
14288      # for the tool.
14289
14290      # First remove it from the list of overridden variables, so we can test
14291      # for unknown variables in the end.
14292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14293
14294      # Check if we try to supply an empty value
14295      if test "x$SED" = x; then
14296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14297$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14299$as_echo_n "checking for SED... " >&6; }
14300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14301$as_echo "disabled" >&6; }
14302      else
14303        # Check if the provided tool contains a complete path.
14304        tool_specified="$SED"
14305        tool_basename="${tool_specified##*/}"
14306        if test "x$tool_basename" = "x$tool_specified"; then
14307          # A command without a complete path is provided, search $PATH.
14308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14309$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14310          # Extract the first word of "$tool_basename", so it can be a program name with args.
14311set dummy $tool_basename; ac_word=$2
14312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14313$as_echo_n "checking for $ac_word... " >&6; }
14314if ${ac_cv_path_SED+:} false; then :
14315  $as_echo_n "(cached) " >&6
14316else
14317  case $SED in
14318  [\\/]* | ?:[\\/]*)
14319  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14320  ;;
14321  *)
14322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14323for as_dir in $PATH
14324do
14325  IFS=$as_save_IFS
14326  test -z "$as_dir" && as_dir=.
14327    for ac_exec_ext in '' $ac_executable_extensions; do
14328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14329    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14331    break 2
14332  fi
14333done
14334  done
14335IFS=$as_save_IFS
14336
14337  ;;
14338esac
14339fi
14340SED=$ac_cv_path_SED
14341if test -n "$SED"; then
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14343$as_echo "$SED" >&6; }
14344else
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14346$as_echo "no" >&6; }
14347fi
14348
14349
14350          if test "x$SED" = x; then
14351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14352          fi
14353        else
14354          # Otherwise we believe it is a complete path. Use it as it is.
14355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14356$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14358$as_echo_n "checking for SED... " >&6; }
14359          if test ! -x "$tool_specified"; then
14360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14361$as_echo "not found" >&6; }
14362            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14363          fi
14364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14365$as_echo "$tool_specified" >&6; }
14366        fi
14367      fi
14368    fi
14369
14370  fi
14371
14372
14373  if test "x$SED" = x; then
14374    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14375  fi
14376
14377
14378
14379  # Always force rm.
14380  RM="$RM -f"
14381
14382  # pwd behaves differently on various platforms and some don't support the -L flag.
14383  # Always use the bash builtin pwd to get uniform behavior.
14384  THEPWDCMD=pwd
14385
14386  # These are not required on all platforms
14387
14388
14389  # Publish this variable in the help.
14390
14391
14392  if [ -z "${CYGPATH+x}" ]; then
14393    # The variable is not set by user, try to locate tool using the code snippet
14394    for ac_prog in cygpath
14395do
14396  # Extract the first word of "$ac_prog", so it can be a program name with args.
14397set dummy $ac_prog; ac_word=$2
14398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14399$as_echo_n "checking for $ac_word... " >&6; }
14400if ${ac_cv_path_CYGPATH+:} false; then :
14401  $as_echo_n "(cached) " >&6
14402else
14403  case $CYGPATH in
14404  [\\/]* | ?:[\\/]*)
14405  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14406  ;;
14407  *)
14408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14409for as_dir in $PATH
14410do
14411  IFS=$as_save_IFS
14412  test -z "$as_dir" && as_dir=.
14413    for ac_exec_ext in '' $ac_executable_extensions; do
14414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14415    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14417    break 2
14418  fi
14419done
14420  done
14421IFS=$as_save_IFS
14422
14423  ;;
14424esac
14425fi
14426CYGPATH=$ac_cv_path_CYGPATH
14427if test -n "$CYGPATH"; then
14428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14429$as_echo "$CYGPATH" >&6; }
14430else
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14432$as_echo "no" >&6; }
14433fi
14434
14435
14436  test -n "$CYGPATH" && break
14437done
14438
14439  else
14440    # The variable is set, but is it from the command line or the environment?
14441
14442    # Try to remove the string !CYGPATH! from our list.
14443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14445      # If it failed, the variable was not from the command line. Ignore it,
14446      # but warn the user (except for BASH, which is always set by the calling BASH).
14447      if test "xCYGPATH" != xBASH; then
14448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14449$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14450      fi
14451      # Try to locate tool using the code snippet
14452      for ac_prog in cygpath
14453do
14454  # Extract the first word of "$ac_prog", so it can be a program name with args.
14455set dummy $ac_prog; ac_word=$2
14456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14457$as_echo_n "checking for $ac_word... " >&6; }
14458if ${ac_cv_path_CYGPATH+:} false; then :
14459  $as_echo_n "(cached) " >&6
14460else
14461  case $CYGPATH in
14462  [\\/]* | ?:[\\/]*)
14463  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14464  ;;
14465  *)
14466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14467for as_dir in $PATH
14468do
14469  IFS=$as_save_IFS
14470  test -z "$as_dir" && as_dir=.
14471    for ac_exec_ext in '' $ac_executable_extensions; do
14472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14473    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14475    break 2
14476  fi
14477done
14478  done
14479IFS=$as_save_IFS
14480
14481  ;;
14482esac
14483fi
14484CYGPATH=$ac_cv_path_CYGPATH
14485if test -n "$CYGPATH"; then
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14487$as_echo "$CYGPATH" >&6; }
14488else
14489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14490$as_echo "no" >&6; }
14491fi
14492
14493
14494  test -n "$CYGPATH" && break
14495done
14496
14497    else
14498      # If it succeeded, then it was overridden by the user. We will use it
14499      # for the tool.
14500
14501      # First remove it from the list of overridden variables, so we can test
14502      # for unknown variables in the end.
14503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14504
14505      # Check if we try to supply an empty value
14506      if test "x$CYGPATH" = x; then
14507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14508$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14510$as_echo_n "checking for CYGPATH... " >&6; }
14511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14512$as_echo "disabled" >&6; }
14513      else
14514        # Check if the provided tool contains a complete path.
14515        tool_specified="$CYGPATH"
14516        tool_basename="${tool_specified##*/}"
14517        if test "x$tool_basename" = "x$tool_specified"; then
14518          # A command without a complete path is provided, search $PATH.
14519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14520$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14521          # Extract the first word of "$tool_basename", so it can be a program name with args.
14522set dummy $tool_basename; ac_word=$2
14523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14524$as_echo_n "checking for $ac_word... " >&6; }
14525if ${ac_cv_path_CYGPATH+:} false; then :
14526  $as_echo_n "(cached) " >&6
14527else
14528  case $CYGPATH in
14529  [\\/]* | ?:[\\/]*)
14530  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14531  ;;
14532  *)
14533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14534for as_dir in $PATH
14535do
14536  IFS=$as_save_IFS
14537  test -z "$as_dir" && as_dir=.
14538    for ac_exec_ext in '' $ac_executable_extensions; do
14539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14540    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14542    break 2
14543  fi
14544done
14545  done
14546IFS=$as_save_IFS
14547
14548  ;;
14549esac
14550fi
14551CYGPATH=$ac_cv_path_CYGPATH
14552if test -n "$CYGPATH"; then
14553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14554$as_echo "$CYGPATH" >&6; }
14555else
14556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14557$as_echo "no" >&6; }
14558fi
14559
14560
14561          if test "x$CYGPATH" = x; then
14562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14563          fi
14564        else
14565          # Otherwise we believe it is a complete path. Use it as it is.
14566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14567$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14569$as_echo_n "checking for CYGPATH... " >&6; }
14570          if test ! -x "$tool_specified"; then
14571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14572$as_echo "not found" >&6; }
14573            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14574          fi
14575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14576$as_echo "$tool_specified" >&6; }
14577        fi
14578      fi
14579    fi
14580
14581  fi
14582
14583
14584
14585
14586  # Publish this variable in the help.
14587
14588
14589  if [ -z "${READLINK+x}" ]; then
14590    # The variable is not set by user, try to locate tool using the code snippet
14591    for ac_prog in greadlink readlink
14592do
14593  # Extract the first word of "$ac_prog", so it can be a program name with args.
14594set dummy $ac_prog; ac_word=$2
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14596$as_echo_n "checking for $ac_word... " >&6; }
14597if ${ac_cv_path_READLINK+:} false; then :
14598  $as_echo_n "(cached) " >&6
14599else
14600  case $READLINK in
14601  [\\/]* | ?:[\\/]*)
14602  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14603  ;;
14604  *)
14605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14606for as_dir in $PATH
14607do
14608  IFS=$as_save_IFS
14609  test -z "$as_dir" && as_dir=.
14610    for ac_exec_ext in '' $ac_executable_extensions; do
14611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14612    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14614    break 2
14615  fi
14616done
14617  done
14618IFS=$as_save_IFS
14619
14620  ;;
14621esac
14622fi
14623READLINK=$ac_cv_path_READLINK
14624if test -n "$READLINK"; then
14625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14626$as_echo "$READLINK" >&6; }
14627else
14628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14629$as_echo "no" >&6; }
14630fi
14631
14632
14633  test -n "$READLINK" && break
14634done
14635
14636  else
14637    # The variable is set, but is it from the command line or the environment?
14638
14639    # Try to remove the string !READLINK! from our list.
14640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14642      # If it failed, the variable was not from the command line. Ignore it,
14643      # but warn the user (except for BASH, which is always set by the calling BASH).
14644      if test "xREADLINK" != xBASH; then
14645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14646$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14647      fi
14648      # Try to locate tool using the code snippet
14649      for ac_prog in greadlink readlink
14650do
14651  # Extract the first word of "$ac_prog", so it can be a program name with args.
14652set dummy $ac_prog; ac_word=$2
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14654$as_echo_n "checking for $ac_word... " >&6; }
14655if ${ac_cv_path_READLINK+:} false; then :
14656  $as_echo_n "(cached) " >&6
14657else
14658  case $READLINK in
14659  [\\/]* | ?:[\\/]*)
14660  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14661  ;;
14662  *)
14663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14664for as_dir in $PATH
14665do
14666  IFS=$as_save_IFS
14667  test -z "$as_dir" && as_dir=.
14668    for ac_exec_ext in '' $ac_executable_extensions; do
14669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14670    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14672    break 2
14673  fi
14674done
14675  done
14676IFS=$as_save_IFS
14677
14678  ;;
14679esac
14680fi
14681READLINK=$ac_cv_path_READLINK
14682if test -n "$READLINK"; then
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14684$as_echo "$READLINK" >&6; }
14685else
14686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14687$as_echo "no" >&6; }
14688fi
14689
14690
14691  test -n "$READLINK" && break
14692done
14693
14694    else
14695      # If it succeeded, then it was overridden by the user. We will use it
14696      # for the tool.
14697
14698      # First remove it from the list of overridden variables, so we can test
14699      # for unknown variables in the end.
14700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14701
14702      # Check if we try to supply an empty value
14703      if test "x$READLINK" = x; then
14704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14705$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14707$as_echo_n "checking for READLINK... " >&6; }
14708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14709$as_echo "disabled" >&6; }
14710      else
14711        # Check if the provided tool contains a complete path.
14712        tool_specified="$READLINK"
14713        tool_basename="${tool_specified##*/}"
14714        if test "x$tool_basename" = "x$tool_specified"; then
14715          # A command without a complete path is provided, search $PATH.
14716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14717$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14718          # Extract the first word of "$tool_basename", so it can be a program name with args.
14719set dummy $tool_basename; ac_word=$2
14720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14721$as_echo_n "checking for $ac_word... " >&6; }
14722if ${ac_cv_path_READLINK+:} false; then :
14723  $as_echo_n "(cached) " >&6
14724else
14725  case $READLINK in
14726  [\\/]* | ?:[\\/]*)
14727  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14728  ;;
14729  *)
14730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14731for as_dir in $PATH
14732do
14733  IFS=$as_save_IFS
14734  test -z "$as_dir" && as_dir=.
14735    for ac_exec_ext in '' $ac_executable_extensions; do
14736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14737    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14739    break 2
14740  fi
14741done
14742  done
14743IFS=$as_save_IFS
14744
14745  ;;
14746esac
14747fi
14748READLINK=$ac_cv_path_READLINK
14749if test -n "$READLINK"; then
14750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14751$as_echo "$READLINK" >&6; }
14752else
14753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14754$as_echo "no" >&6; }
14755fi
14756
14757
14758          if test "x$READLINK" = x; then
14759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14760          fi
14761        else
14762          # Otherwise we believe it is a complete path. Use it as it is.
14763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14764$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14766$as_echo_n "checking for READLINK... " >&6; }
14767          if test ! -x "$tool_specified"; then
14768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14769$as_echo "not found" >&6; }
14770            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14771          fi
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14773$as_echo "$tool_specified" >&6; }
14774        fi
14775      fi
14776    fi
14777
14778  fi
14779
14780
14781
14782
14783  # Publish this variable in the help.
14784
14785
14786  if [ -z "${DF+x}" ]; then
14787    # The variable is not set by user, try to locate tool using the code snippet
14788    for ac_prog in df
14789do
14790  # Extract the first word of "$ac_prog", so it can be a program name with args.
14791set dummy $ac_prog; ac_word=$2
14792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14793$as_echo_n "checking for $ac_word... " >&6; }
14794if ${ac_cv_path_DF+:} false; then :
14795  $as_echo_n "(cached) " >&6
14796else
14797  case $DF in
14798  [\\/]* | ?:[\\/]*)
14799  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14800  ;;
14801  *)
14802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14803for as_dir in $PATH
14804do
14805  IFS=$as_save_IFS
14806  test -z "$as_dir" && as_dir=.
14807    for ac_exec_ext in '' $ac_executable_extensions; do
14808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14809    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14811    break 2
14812  fi
14813done
14814  done
14815IFS=$as_save_IFS
14816
14817  ;;
14818esac
14819fi
14820DF=$ac_cv_path_DF
14821if test -n "$DF"; then
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14823$as_echo "$DF" >&6; }
14824else
14825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14826$as_echo "no" >&6; }
14827fi
14828
14829
14830  test -n "$DF" && break
14831done
14832
14833  else
14834    # The variable is set, but is it from the command line or the environment?
14835
14836    # Try to remove the string !DF! from our list.
14837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14839      # If it failed, the variable was not from the command line. Ignore it,
14840      # but warn the user (except for BASH, which is always set by the calling BASH).
14841      if test "xDF" != xBASH; then
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14843$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14844      fi
14845      # Try to locate tool using the code snippet
14846      for ac_prog in df
14847do
14848  # Extract the first word of "$ac_prog", so it can be a program name with args.
14849set dummy $ac_prog; ac_word=$2
14850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14851$as_echo_n "checking for $ac_word... " >&6; }
14852if ${ac_cv_path_DF+:} false; then :
14853  $as_echo_n "(cached) " >&6
14854else
14855  case $DF in
14856  [\\/]* | ?:[\\/]*)
14857  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14858  ;;
14859  *)
14860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14861for as_dir in $PATH
14862do
14863  IFS=$as_save_IFS
14864  test -z "$as_dir" && as_dir=.
14865    for ac_exec_ext in '' $ac_executable_extensions; do
14866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14867    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14869    break 2
14870  fi
14871done
14872  done
14873IFS=$as_save_IFS
14874
14875  ;;
14876esac
14877fi
14878DF=$ac_cv_path_DF
14879if test -n "$DF"; then
14880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14881$as_echo "$DF" >&6; }
14882else
14883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14884$as_echo "no" >&6; }
14885fi
14886
14887
14888  test -n "$DF" && break
14889done
14890
14891    else
14892      # If it succeeded, then it was overridden by the user. We will use it
14893      # for the tool.
14894
14895      # First remove it from the list of overridden variables, so we can test
14896      # for unknown variables in the end.
14897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14898
14899      # Check if we try to supply an empty value
14900      if test "x$DF" = x; then
14901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14902$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14904$as_echo_n "checking for DF... " >&6; }
14905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14906$as_echo "disabled" >&6; }
14907      else
14908        # Check if the provided tool contains a complete path.
14909        tool_specified="$DF"
14910        tool_basename="${tool_specified##*/}"
14911        if test "x$tool_basename" = "x$tool_specified"; then
14912          # A command without a complete path is provided, search $PATH.
14913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14914$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14915          # Extract the first word of "$tool_basename", so it can be a program name with args.
14916set dummy $tool_basename; ac_word=$2
14917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14918$as_echo_n "checking for $ac_word... " >&6; }
14919if ${ac_cv_path_DF+:} false; then :
14920  $as_echo_n "(cached) " >&6
14921else
14922  case $DF in
14923  [\\/]* | ?:[\\/]*)
14924  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14925  ;;
14926  *)
14927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14928for as_dir in $PATH
14929do
14930  IFS=$as_save_IFS
14931  test -z "$as_dir" && as_dir=.
14932    for ac_exec_ext in '' $ac_executable_extensions; do
14933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14934    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14936    break 2
14937  fi
14938done
14939  done
14940IFS=$as_save_IFS
14941
14942  ;;
14943esac
14944fi
14945DF=$ac_cv_path_DF
14946if test -n "$DF"; then
14947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14948$as_echo "$DF" >&6; }
14949else
14950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14951$as_echo "no" >&6; }
14952fi
14953
14954
14955          if test "x$DF" = x; then
14956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14957          fi
14958        else
14959          # Otherwise we believe it is a complete path. Use it as it is.
14960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14961$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14963$as_echo_n "checking for DF... " >&6; }
14964          if test ! -x "$tool_specified"; then
14965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14966$as_echo "not found" >&6; }
14967            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14968          fi
14969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14970$as_echo "$tool_specified" >&6; }
14971        fi
14972      fi
14973    fi
14974
14975  fi
14976
14977
14978
14979
14980  # Publish this variable in the help.
14981
14982
14983  if [ -z "${CPIO+x}" ]; then
14984    # The variable is not set by user, try to locate tool using the code snippet
14985    for ac_prog in cpio bsdcpio
14986do
14987  # Extract the first word of "$ac_prog", so it can be a program name with args.
14988set dummy $ac_prog; ac_word=$2
14989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14990$as_echo_n "checking for $ac_word... " >&6; }
14991if ${ac_cv_path_CPIO+:} false; then :
14992  $as_echo_n "(cached) " >&6
14993else
14994  case $CPIO in
14995  [\\/]* | ?:[\\/]*)
14996  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14997  ;;
14998  *)
14999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15000for as_dir in $PATH
15001do
15002  IFS=$as_save_IFS
15003  test -z "$as_dir" && as_dir=.
15004    for ac_exec_ext in '' $ac_executable_extensions; do
15005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15006    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15008    break 2
15009  fi
15010done
15011  done
15012IFS=$as_save_IFS
15013
15014  ;;
15015esac
15016fi
15017CPIO=$ac_cv_path_CPIO
15018if test -n "$CPIO"; then
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15020$as_echo "$CPIO" >&6; }
15021else
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15023$as_echo "no" >&6; }
15024fi
15025
15026
15027  test -n "$CPIO" && break
15028done
15029
15030  else
15031    # The variable is set, but is it from the command line or the environment?
15032
15033    # Try to remove the string !CPIO! from our list.
15034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15036      # If it failed, the variable was not from the command line. Ignore it,
15037      # but warn the user (except for BASH, which is always set by the calling BASH).
15038      if test "xCPIO" != xBASH; then
15039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15040$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15041      fi
15042      # Try to locate tool using the code snippet
15043      for ac_prog in cpio bsdcpio
15044do
15045  # Extract the first word of "$ac_prog", so it can be a program name with args.
15046set dummy $ac_prog; ac_word=$2
15047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15048$as_echo_n "checking for $ac_word... " >&6; }
15049if ${ac_cv_path_CPIO+:} false; then :
15050  $as_echo_n "(cached) " >&6
15051else
15052  case $CPIO in
15053  [\\/]* | ?:[\\/]*)
15054  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15055  ;;
15056  *)
15057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15058for as_dir in $PATH
15059do
15060  IFS=$as_save_IFS
15061  test -z "$as_dir" && as_dir=.
15062    for ac_exec_ext in '' $ac_executable_extensions; do
15063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15064    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15066    break 2
15067  fi
15068done
15069  done
15070IFS=$as_save_IFS
15071
15072  ;;
15073esac
15074fi
15075CPIO=$ac_cv_path_CPIO
15076if test -n "$CPIO"; then
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15078$as_echo "$CPIO" >&6; }
15079else
15080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15081$as_echo "no" >&6; }
15082fi
15083
15084
15085  test -n "$CPIO" && break
15086done
15087
15088    else
15089      # If it succeeded, then it was overridden by the user. We will use it
15090      # for the tool.
15091
15092      # First remove it from the list of overridden variables, so we can test
15093      # for unknown variables in the end.
15094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15095
15096      # Check if we try to supply an empty value
15097      if test "x$CPIO" = x; then
15098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15099$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15101$as_echo_n "checking for CPIO... " >&6; }
15102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15103$as_echo "disabled" >&6; }
15104      else
15105        # Check if the provided tool contains a complete path.
15106        tool_specified="$CPIO"
15107        tool_basename="${tool_specified##*/}"
15108        if test "x$tool_basename" = "x$tool_specified"; then
15109          # A command without a complete path is provided, search $PATH.
15110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15111$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15112          # Extract the first word of "$tool_basename", so it can be a program name with args.
15113set dummy $tool_basename; ac_word=$2
15114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15115$as_echo_n "checking for $ac_word... " >&6; }
15116if ${ac_cv_path_CPIO+:} false; then :
15117  $as_echo_n "(cached) " >&6
15118else
15119  case $CPIO in
15120  [\\/]* | ?:[\\/]*)
15121  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15122  ;;
15123  *)
15124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15125for as_dir in $PATH
15126do
15127  IFS=$as_save_IFS
15128  test -z "$as_dir" && as_dir=.
15129    for ac_exec_ext in '' $ac_executable_extensions; do
15130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15131    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15133    break 2
15134  fi
15135done
15136  done
15137IFS=$as_save_IFS
15138
15139  ;;
15140esac
15141fi
15142CPIO=$ac_cv_path_CPIO
15143if test -n "$CPIO"; then
15144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15145$as_echo "$CPIO" >&6; }
15146else
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15148$as_echo "no" >&6; }
15149fi
15150
15151
15152          if test "x$CPIO" = x; then
15153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15154          fi
15155        else
15156          # Otherwise we believe it is a complete path. Use it as it is.
15157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15158$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15160$as_echo_n "checking for CPIO... " >&6; }
15161          if test ! -x "$tool_specified"; then
15162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15163$as_echo "not found" >&6; }
15164            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15165          fi
15166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15167$as_echo "$tool_specified" >&6; }
15168        fi
15169      fi
15170    fi
15171
15172  fi
15173
15174
15175
15176
15177  # Publish this variable in the help.
15178
15179
15180  if [ -z "${NICE+x}" ]; then
15181    # The variable is not set by user, try to locate tool using the code snippet
15182    for ac_prog in nice
15183do
15184  # Extract the first word of "$ac_prog", so it can be a program name with args.
15185set dummy $ac_prog; ac_word=$2
15186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15187$as_echo_n "checking for $ac_word... " >&6; }
15188if ${ac_cv_path_NICE+:} false; then :
15189  $as_echo_n "(cached) " >&6
15190else
15191  case $NICE in
15192  [\\/]* | ?:[\\/]*)
15193  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15194  ;;
15195  *)
15196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15197for as_dir in $PATH
15198do
15199  IFS=$as_save_IFS
15200  test -z "$as_dir" && as_dir=.
15201    for ac_exec_ext in '' $ac_executable_extensions; do
15202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15203    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15205    break 2
15206  fi
15207done
15208  done
15209IFS=$as_save_IFS
15210
15211  ;;
15212esac
15213fi
15214NICE=$ac_cv_path_NICE
15215if test -n "$NICE"; then
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15217$as_echo "$NICE" >&6; }
15218else
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15220$as_echo "no" >&6; }
15221fi
15222
15223
15224  test -n "$NICE" && break
15225done
15226
15227  else
15228    # The variable is set, but is it from the command line or the environment?
15229
15230    # Try to remove the string !NICE! from our list.
15231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15233      # If it failed, the variable was not from the command line. Ignore it,
15234      # but warn the user (except for BASH, which is always set by the calling BASH).
15235      if test "xNICE" != xBASH; then
15236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15237$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15238      fi
15239      # Try to locate tool using the code snippet
15240      for ac_prog in nice
15241do
15242  # Extract the first word of "$ac_prog", so it can be a program name with args.
15243set dummy $ac_prog; ac_word=$2
15244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15245$as_echo_n "checking for $ac_word... " >&6; }
15246if ${ac_cv_path_NICE+:} false; then :
15247  $as_echo_n "(cached) " >&6
15248else
15249  case $NICE in
15250  [\\/]* | ?:[\\/]*)
15251  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15252  ;;
15253  *)
15254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15255for as_dir in $PATH
15256do
15257  IFS=$as_save_IFS
15258  test -z "$as_dir" && as_dir=.
15259    for ac_exec_ext in '' $ac_executable_extensions; do
15260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15261    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15263    break 2
15264  fi
15265done
15266  done
15267IFS=$as_save_IFS
15268
15269  ;;
15270esac
15271fi
15272NICE=$ac_cv_path_NICE
15273if test -n "$NICE"; then
15274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15275$as_echo "$NICE" >&6; }
15276else
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15278$as_echo "no" >&6; }
15279fi
15280
15281
15282  test -n "$NICE" && break
15283done
15284
15285    else
15286      # If it succeeded, then it was overridden by the user. We will use it
15287      # for the tool.
15288
15289      # First remove it from the list of overridden variables, so we can test
15290      # for unknown variables in the end.
15291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15292
15293      # Check if we try to supply an empty value
15294      if test "x$NICE" = x; then
15295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15296$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15298$as_echo_n "checking for NICE... " >&6; }
15299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15300$as_echo "disabled" >&6; }
15301      else
15302        # Check if the provided tool contains a complete path.
15303        tool_specified="$NICE"
15304        tool_basename="${tool_specified##*/}"
15305        if test "x$tool_basename" = "x$tool_specified"; then
15306          # A command without a complete path is provided, search $PATH.
15307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15308$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15309          # Extract the first word of "$tool_basename", so it can be a program name with args.
15310set dummy $tool_basename; ac_word=$2
15311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15312$as_echo_n "checking for $ac_word... " >&6; }
15313if ${ac_cv_path_NICE+:} false; then :
15314  $as_echo_n "(cached) " >&6
15315else
15316  case $NICE in
15317  [\\/]* | ?:[\\/]*)
15318  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15319  ;;
15320  *)
15321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15322for as_dir in $PATH
15323do
15324  IFS=$as_save_IFS
15325  test -z "$as_dir" && as_dir=.
15326    for ac_exec_ext in '' $ac_executable_extensions; do
15327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15328    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15330    break 2
15331  fi
15332done
15333  done
15334IFS=$as_save_IFS
15335
15336  ;;
15337esac
15338fi
15339NICE=$ac_cv_path_NICE
15340if test -n "$NICE"; then
15341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15342$as_echo "$NICE" >&6; }
15343else
15344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15345$as_echo "no" >&6; }
15346fi
15347
15348
15349          if test "x$NICE" = x; then
15350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15351          fi
15352        else
15353          # Otherwise we believe it is a complete path. Use it as it is.
15354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15355$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15357$as_echo_n "checking for NICE... " >&6; }
15358          if test ! -x "$tool_specified"; then
15359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15360$as_echo "not found" >&6; }
15361            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15362          fi
15363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15364$as_echo "$tool_specified" >&6; }
15365        fi
15366      fi
15367    fi
15368
15369  fi
15370
15371
15372
15373
15374  # Publish this variable in the help.
15375
15376
15377  if [ -z "${PANDOC+x}" ]; then
15378    # The variable is not set by user, try to locate tool using the code snippet
15379    for ac_prog in pandoc
15380do
15381  # Extract the first word of "$ac_prog", so it can be a program name with args.
15382set dummy $ac_prog; ac_word=$2
15383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15384$as_echo_n "checking for $ac_word... " >&6; }
15385if ${ac_cv_path_PANDOC+:} false; then :
15386  $as_echo_n "(cached) " >&6
15387else
15388  case $PANDOC in
15389  [\\/]* | ?:[\\/]*)
15390  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15391  ;;
15392  *)
15393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15394for as_dir in $PATH
15395do
15396  IFS=$as_save_IFS
15397  test -z "$as_dir" && as_dir=.
15398    for ac_exec_ext in '' $ac_executable_extensions; do
15399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15400    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15402    break 2
15403  fi
15404done
15405  done
15406IFS=$as_save_IFS
15407
15408  ;;
15409esac
15410fi
15411PANDOC=$ac_cv_path_PANDOC
15412if test -n "$PANDOC"; then
15413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15414$as_echo "$PANDOC" >&6; }
15415else
15416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15417$as_echo "no" >&6; }
15418fi
15419
15420
15421  test -n "$PANDOC" && break
15422done
15423
15424  else
15425    # The variable is set, but is it from the command line or the environment?
15426
15427    # Try to remove the string !PANDOC! from our list.
15428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15430      # If it failed, the variable was not from the command line. Ignore it,
15431      # but warn the user (except for BASH, which is always set by the calling BASH).
15432      if test "xPANDOC" != xBASH; then
15433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15434$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15435      fi
15436      # Try to locate tool using the code snippet
15437      for ac_prog in pandoc
15438do
15439  # Extract the first word of "$ac_prog", so it can be a program name with args.
15440set dummy $ac_prog; ac_word=$2
15441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15442$as_echo_n "checking for $ac_word... " >&6; }
15443if ${ac_cv_path_PANDOC+:} false; then :
15444  $as_echo_n "(cached) " >&6
15445else
15446  case $PANDOC in
15447  [\\/]* | ?:[\\/]*)
15448  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15449  ;;
15450  *)
15451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15452for as_dir in $PATH
15453do
15454  IFS=$as_save_IFS
15455  test -z "$as_dir" && as_dir=.
15456    for ac_exec_ext in '' $ac_executable_extensions; do
15457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15458    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15460    break 2
15461  fi
15462done
15463  done
15464IFS=$as_save_IFS
15465
15466  ;;
15467esac
15468fi
15469PANDOC=$ac_cv_path_PANDOC
15470if test -n "$PANDOC"; then
15471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15472$as_echo "$PANDOC" >&6; }
15473else
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15475$as_echo "no" >&6; }
15476fi
15477
15478
15479  test -n "$PANDOC" && break
15480done
15481
15482    else
15483      # If it succeeded, then it was overridden by the user. We will use it
15484      # for the tool.
15485
15486      # First remove it from the list of overridden variables, so we can test
15487      # for unknown variables in the end.
15488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15489
15490      # Check if we try to supply an empty value
15491      if test "x$PANDOC" = x; then
15492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15493$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15495$as_echo_n "checking for PANDOC... " >&6; }
15496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15497$as_echo "disabled" >&6; }
15498      else
15499        # Check if the provided tool contains a complete path.
15500        tool_specified="$PANDOC"
15501        tool_basename="${tool_specified##*/}"
15502        if test "x$tool_basename" = "x$tool_specified"; then
15503          # A command without a complete path is provided, search $PATH.
15504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15505$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15506          # Extract the first word of "$tool_basename", so it can be a program name with args.
15507set dummy $tool_basename; ac_word=$2
15508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15509$as_echo_n "checking for $ac_word... " >&6; }
15510if ${ac_cv_path_PANDOC+:} false; then :
15511  $as_echo_n "(cached) " >&6
15512else
15513  case $PANDOC in
15514  [\\/]* | ?:[\\/]*)
15515  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15516  ;;
15517  *)
15518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15519for as_dir in $PATH
15520do
15521  IFS=$as_save_IFS
15522  test -z "$as_dir" && as_dir=.
15523    for ac_exec_ext in '' $ac_executable_extensions; do
15524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15525    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15527    break 2
15528  fi
15529done
15530  done
15531IFS=$as_save_IFS
15532
15533  ;;
15534esac
15535fi
15536PANDOC=$ac_cv_path_PANDOC
15537if test -n "$PANDOC"; then
15538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15539$as_echo "$PANDOC" >&6; }
15540else
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15542$as_echo "no" >&6; }
15543fi
15544
15545
15546          if test "x$PANDOC" = x; then
15547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15548          fi
15549        else
15550          # Otherwise we believe it is a complete path. Use it as it is.
15551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15552$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15554$as_echo_n "checking for PANDOC... " >&6; }
15555          if test ! -x "$tool_specified"; then
15556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15557$as_echo "not found" >&6; }
15558            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15559          fi
15560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15561$as_echo "$tool_specified" >&6; }
15562        fi
15563      fi
15564    fi
15565
15566  fi
15567
15568
15569
15570
15571# Now we can determine OpenJDK build and target platforms. This is required to
15572# have early on.
15573# Make sure we can run config.sub.
15574$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15575  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15576
15577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15578$as_echo_n "checking build system type... " >&6; }
15579if ${ac_cv_build+:} false; then :
15580  $as_echo_n "(cached) " >&6
15581else
15582  ac_build_alias=$build_alias
15583test "x$ac_build_alias" = x &&
15584  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15585test "x$ac_build_alias" = x &&
15586  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15587ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15588  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15589
15590fi
15591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15592$as_echo "$ac_cv_build" >&6; }
15593case $ac_cv_build in
15594*-*-*) ;;
15595*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15596esac
15597build=$ac_cv_build
15598ac_save_IFS=$IFS; IFS='-'
15599set x $ac_cv_build
15600shift
15601build_cpu=$1
15602build_vendor=$2
15603shift; shift
15604# Remember, the first character of IFS is used to create $*,
15605# except with old shells:
15606build_os=$*
15607IFS=$ac_save_IFS
15608case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15609
15610
15611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15612$as_echo_n "checking host system type... " >&6; }
15613if ${ac_cv_host+:} false; then :
15614  $as_echo_n "(cached) " >&6
15615else
15616  if test "x$host_alias" = x; then
15617  ac_cv_host=$ac_cv_build
15618else
15619  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15620    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15621fi
15622
15623fi
15624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15625$as_echo "$ac_cv_host" >&6; }
15626case $ac_cv_host in
15627*-*-*) ;;
15628*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15629esac
15630host=$ac_cv_host
15631ac_save_IFS=$IFS; IFS='-'
15632set x $ac_cv_host
15633shift
15634host_cpu=$1
15635host_vendor=$2
15636shift; shift
15637# Remember, the first character of IFS is used to create $*,
15638# except with old shells:
15639host_os=$*
15640IFS=$ac_save_IFS
15641case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15642
15643
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15645$as_echo_n "checking target system type... " >&6; }
15646if ${ac_cv_target+:} false; then :
15647  $as_echo_n "(cached) " >&6
15648else
15649  if test "x$target_alias" = x; then
15650  ac_cv_target=$ac_cv_host
15651else
15652  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15653    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15654fi
15655
15656fi
15657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15658$as_echo "$ac_cv_target" >&6; }
15659case $ac_cv_target in
15660*-*-*) ;;
15661*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15662esac
15663target=$ac_cv_target
15664ac_save_IFS=$IFS; IFS='-'
15665set x $ac_cv_target
15666shift
15667target_cpu=$1
15668target_vendor=$2
15669shift; shift
15670# Remember, the first character of IFS is used to create $*,
15671# except with old shells:
15672target_os=$*
15673IFS=$ac_save_IFS
15674case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15675
15676
15677# The aliases save the names the user supplied, while $host etc.
15678# will get canonicalized.
15679test -n "$target_alias" &&
15680  test "$program_prefix$program_suffix$program_transform_name" = \
15681    NONENONEs,x,x, &&
15682  program_prefix=${target_alias}-
15683
15684  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15685  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15686  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15687  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15688  # to use the configure naming style.
15689
15690
15691
15692
15693
15694  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15695  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15696  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15697  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15698  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15699  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15700
15701
15702
15703  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15704
15705  case "$build_os" in
15706    *linux*)
15707      VAR_OS=linux
15708      VAR_OS_TYPE=unix
15709      ;;
15710    *solaris*)
15711      VAR_OS=solaris
15712      VAR_OS_TYPE=unix
15713      ;;
15714    *darwin*)
15715      VAR_OS=macosx
15716      VAR_OS_TYPE=unix
15717      ;;
15718    *bsd*)
15719      VAR_OS=bsd
15720      VAR_OS_TYPE=unix
15721      ;;
15722    *cygwin*)
15723      VAR_OS=windows
15724      VAR_OS_ENV=windows.cygwin
15725      ;;
15726    *mingw*)
15727      VAR_OS=windows
15728      VAR_OS_ENV=windows.msys
15729      ;;
15730    *aix*)
15731      VAR_OS=aix
15732      VAR_OS_TYPE=unix
15733      ;;
15734    *)
15735      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15736      ;;
15737  esac
15738
15739
15740  # First argument is the cpu name from the trip/quad
15741  case "$build_cpu" in
15742    x86_64)
15743      VAR_CPU=x86_64
15744      VAR_CPU_ARCH=x86
15745      VAR_CPU_BITS=64
15746      VAR_CPU_ENDIAN=little
15747      ;;
15748    i?86)
15749      VAR_CPU=x86
15750      VAR_CPU_ARCH=x86
15751      VAR_CPU_BITS=32
15752      VAR_CPU_ENDIAN=little
15753      ;;
15754    arm*)
15755      VAR_CPU=arm
15756      VAR_CPU_ARCH=arm
15757      VAR_CPU_BITS=32
15758      VAR_CPU_ENDIAN=little
15759      ;;
15760    aarch64)
15761      VAR_CPU=aarch64
15762      VAR_CPU_ARCH=aarch64
15763      VAR_CPU_BITS=64
15764      VAR_CPU_ENDIAN=little
15765      ;;
15766    powerpc)
15767      VAR_CPU=ppc
15768      VAR_CPU_ARCH=ppc
15769      VAR_CPU_BITS=32
15770      VAR_CPU_ENDIAN=big
15771      ;;
15772    powerpc64)
15773      VAR_CPU=ppc64
15774      VAR_CPU_ARCH=ppc
15775      VAR_CPU_BITS=64
15776      VAR_CPU_ENDIAN=big
15777      ;;
15778    powerpc64le)
15779      VAR_CPU=ppc64le
15780      VAR_CPU_ARCH=ppc
15781      VAR_CPU_BITS=64
15782      VAR_CPU_ENDIAN=little
15783      ;;
15784    s390)
15785      VAR_CPU=s390
15786      VAR_CPU_ARCH=s390
15787      VAR_CPU_BITS=32
15788      VAR_CPU_ENDIAN=big
15789      ;;
15790    s390x)
15791      VAR_CPU=s390x
15792      VAR_CPU_ARCH=s390
15793      VAR_CPU_BITS=64
15794      VAR_CPU_ENDIAN=big
15795      ;;
15796    sparc)
15797      VAR_CPU=sparc
15798      VAR_CPU_ARCH=sparc
15799      VAR_CPU_BITS=32
15800      VAR_CPU_ENDIAN=big
15801      ;;
15802    sparcv9|sparc64)
15803      VAR_CPU=sparcv9
15804      VAR_CPU_ARCH=sparc
15805      VAR_CPU_BITS=64
15806      VAR_CPU_ENDIAN=big
15807      ;;
15808    *)
15809      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15810      ;;
15811  esac
15812
15813  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15814  OPENJDK_BUILD_OS="$VAR_OS"
15815  if test "x$VAR_OS_TYPE" != x; then
15816    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15817  else
15818    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15819  fi
15820  if test "x$VAR_OS_ENV" != x; then
15821    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15822  else
15823    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15824  fi
15825  OPENJDK_BUILD_CPU="$VAR_CPU"
15826  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15827  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15828  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15829
15830
15831
15832
15833
15834
15835
15836
15837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15838$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15840$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15841
15842  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15843
15844  case "$host_os" in
15845    *linux*)
15846      VAR_OS=linux
15847      VAR_OS_TYPE=unix
15848      ;;
15849    *solaris*)
15850      VAR_OS=solaris
15851      VAR_OS_TYPE=unix
15852      ;;
15853    *darwin*)
15854      VAR_OS=macosx
15855      VAR_OS_TYPE=unix
15856      ;;
15857    *bsd*)
15858      VAR_OS=bsd
15859      VAR_OS_TYPE=unix
15860      ;;
15861    *cygwin*)
15862      VAR_OS=windows
15863      VAR_OS_ENV=windows.cygwin
15864      ;;
15865    *mingw*)
15866      VAR_OS=windows
15867      VAR_OS_ENV=windows.msys
15868      ;;
15869    *aix*)
15870      VAR_OS=aix
15871      VAR_OS_TYPE=unix
15872      ;;
15873    *)
15874      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15875      ;;
15876  esac
15877
15878
15879  # First argument is the cpu name from the trip/quad
15880  case "$host_cpu" in
15881    x86_64)
15882      VAR_CPU=x86_64
15883      VAR_CPU_ARCH=x86
15884      VAR_CPU_BITS=64
15885      VAR_CPU_ENDIAN=little
15886      ;;
15887    i?86)
15888      VAR_CPU=x86
15889      VAR_CPU_ARCH=x86
15890      VAR_CPU_BITS=32
15891      VAR_CPU_ENDIAN=little
15892      ;;
15893    arm*)
15894      VAR_CPU=arm
15895      VAR_CPU_ARCH=arm
15896      VAR_CPU_BITS=32
15897      VAR_CPU_ENDIAN=little
15898      ;;
15899    aarch64)
15900      VAR_CPU=aarch64
15901      VAR_CPU_ARCH=aarch64
15902      VAR_CPU_BITS=64
15903      VAR_CPU_ENDIAN=little
15904      ;;
15905    powerpc)
15906      VAR_CPU=ppc
15907      VAR_CPU_ARCH=ppc
15908      VAR_CPU_BITS=32
15909      VAR_CPU_ENDIAN=big
15910      ;;
15911    powerpc64)
15912      VAR_CPU=ppc64
15913      VAR_CPU_ARCH=ppc
15914      VAR_CPU_BITS=64
15915      VAR_CPU_ENDIAN=big
15916      ;;
15917    powerpc64le)
15918      VAR_CPU=ppc64le
15919      VAR_CPU_ARCH=ppc
15920      VAR_CPU_BITS=64
15921      VAR_CPU_ENDIAN=little
15922      ;;
15923    s390)
15924      VAR_CPU=s390
15925      VAR_CPU_ARCH=s390
15926      VAR_CPU_BITS=32
15927      VAR_CPU_ENDIAN=big
15928      ;;
15929    s390x)
15930      VAR_CPU=s390x
15931      VAR_CPU_ARCH=s390
15932      VAR_CPU_BITS=64
15933      VAR_CPU_ENDIAN=big
15934      ;;
15935    sparc)
15936      VAR_CPU=sparc
15937      VAR_CPU_ARCH=sparc
15938      VAR_CPU_BITS=32
15939      VAR_CPU_ENDIAN=big
15940      ;;
15941    sparcv9|sparc64)
15942      VAR_CPU=sparcv9
15943      VAR_CPU_ARCH=sparc
15944      VAR_CPU_BITS=64
15945      VAR_CPU_ENDIAN=big
15946      ;;
15947    *)
15948      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15949      ;;
15950  esac
15951
15952  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15953  OPENJDK_TARGET_OS="$VAR_OS"
15954  if test "x$VAR_OS_TYPE" != x; then
15955    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15956  else
15957    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15958  fi
15959  if test "x$VAR_OS_ENV" != x; then
15960    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15961  else
15962    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15963  fi
15964  OPENJDK_TARGET_CPU="$VAR_CPU"
15965  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15966  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15967  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15968
15969
15970
15971
15972
15973
15974
15975
15976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15977$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15979$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15980
15981
15982
15983# Check whether --with-target-bits was given.
15984if test "${with_target_bits+set}" = set; then :
15985  withval=$with_target_bits;
15986fi
15987
15988
15989  # We have three types of compiles:
15990  # native  == normal compilation, target system == build system
15991  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15992  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15993  #
15994  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15995    # We're doing a proper cross-compilation
15996    COMPILE_TYPE="cross"
15997  else
15998    COMPILE_TYPE="native"
15999  fi
16000
16001  if test "x$with_target_bits" != x; then
16002    if test "x$COMPILE_TYPE" = "xcross"; then
16003      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16004    fi
16005
16006    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16007      # A reduced build is requested
16008      COMPILE_TYPE="reduced"
16009      OPENJDK_TARGET_CPU_BITS=32
16010      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16011        OPENJDK_TARGET_CPU=x86
16012      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16013        OPENJDK_TARGET_CPU=sparc
16014      else
16015        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16016      fi
16017    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16018      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
16019    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16020      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16021$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16022    else
16023      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16024    fi
16025  fi
16026
16027
16028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16029$as_echo_n "checking compilation type... " >&6; }
16030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16031$as_echo "$COMPILE_TYPE" >&6; }
16032
16033
16034  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16035    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16036  else
16037    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16038  fi
16039
16040  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16041    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16042  else
16043    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16044  fi
16045
16046
16047
16048
16049
16050
16051  # Also store the legacy naming of the cpu.
16052  # Ie i586 and amd64 instead of x86 and x86_64
16053  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16054  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16055    OPENJDK_TARGET_CPU_LEGACY="i586"
16056  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16057    # On all platforms except MacOSX replace x86_64 with amd64.
16058    OPENJDK_TARGET_CPU_LEGACY="amd64"
16059  fi
16060
16061
16062  # And the second legacy naming of the cpu.
16063  # Ie i386 and amd64 instead of x86 and x86_64.
16064  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16065  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16066    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16067  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16068    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16069  fi
16070
16071
16072  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16073  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16074  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16075  OPENJDK_TARGET_CPU_ISADIR=""
16076  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16077    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16078      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16079    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16080      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16081    fi
16082  fi
16083
16084
16085  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16086  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16087  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16088    # On linux only, we replace x86 with i386.
16089    OPENJDK_TARGET_CPU_OSARCH="i386"
16090  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16091    # On all platforms except macosx, we replace x86_64 with amd64.
16092    OPENJDK_TARGET_CPU_OSARCH="amd64"
16093  fi
16094
16095
16096  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16097  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16098    OPENJDK_TARGET_CPU_JLI="i386"
16099  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16100    # On all platforms except macosx, we replace x86_64 with amd64.
16101    OPENJDK_TARGET_CPU_JLI="amd64"
16102  fi
16103
16104  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16105      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16106  else
16107      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16108  fi
16109
16110
16111  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16112  # Macosx is osx and x86_64 is x64
16113  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16114    OPENJDK_TARGET_OS_BUNDLE="osx"
16115  else
16116    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16117  fi
16118  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16119    OPENJDK_TARGET_CPU_BUNDLE="x64"
16120  else
16121    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16122  fi
16123  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16124
16125
16126  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16127    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16128    # unpack200.exe. This variable is used in
16129    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16130    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16131      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16132    fi
16133  fi
16134
16135  if test "x$COMPILE_TYPE" = "xcross"; then
16136    # FIXME: ... or should this include reduced builds..?
16137    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16138  else
16139    DEFINE_CROSS_COMPILE_ARCH=""
16140  fi
16141
16142
16143  # Convert openjdk platform names to hotspot names
16144
16145  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16146  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16147    HOTSPOT_TARGET_OS=bsd
16148  fi
16149
16150
16151  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16152  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16153    HOTSPOT_TARGET_OS_TYPE=posix
16154  fi
16155
16156
16157  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16158  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16159    HOTSPOT_TARGET_CPU=x86_32
16160  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16161    HOTSPOT_TARGET_CPU=sparc
16162  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16163    HOTSPOT_TARGET_CPU=ppc_64
16164  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16165    HOTSPOT_TARGET_CPU=ppc_64
16166  fi
16167
16168
16169  # This is identical with OPENJDK_*, but define anyway for consistency.
16170  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16171
16172
16173  # Setup HOTSPOT_TARGET_CPU_DEFINE
16174  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16175    HOTSPOT_TARGET_CPU_DEFINE=IA32
16176  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16177    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16178  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16179    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16180  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16181    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16182  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16183    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16184  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16185    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16186
16187  # The cpu defines below are for zero, we don't support them directly.
16188  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16189    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16190  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16191    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16192  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16193    HOTSPOT_TARGET_CPU_DEFINE=S390
16194  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16195    HOTSPOT_TARGET_CPU_DEFINE=S390
16196  elif test "x$OPENJDK_TARGET_CPU" != x; then
16197    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16198  fi
16199
16200
16201
16202
16203  # Also store the legacy naming of the cpu.
16204  # Ie i586 and amd64 instead of x86 and x86_64
16205  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16206  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16207    OPENJDK_BUILD_CPU_LEGACY="i586"
16208  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16209    # On all platforms except MacOSX replace x86_64 with amd64.
16210    OPENJDK_BUILD_CPU_LEGACY="amd64"
16211  fi
16212
16213
16214  # And the second legacy naming of the cpu.
16215  # Ie i386 and amd64 instead of x86 and x86_64.
16216  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16217  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16218    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16219  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16220    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16221  fi
16222
16223
16224  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16225  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16226  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16227  OPENJDK_BUILD_CPU_ISADIR=""
16228  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16229    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16230      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16231    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16232      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16233    fi
16234  fi
16235
16236
16237  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16238  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16239  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16240    # On linux only, we replace x86 with i386.
16241    OPENJDK_BUILD_CPU_OSARCH="i386"
16242  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16243    # On all platforms except macosx, we replace x86_64 with amd64.
16244    OPENJDK_BUILD_CPU_OSARCH="amd64"
16245  fi
16246
16247
16248  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16249  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16250    OPENJDK_BUILD_CPU_JLI="i386"
16251  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16252    # On all platforms except macosx, we replace x86_64 with amd64.
16253    OPENJDK_BUILD_CPU_JLI="amd64"
16254  fi
16255
16256  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16257      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16258  else
16259      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16260  fi
16261
16262
16263  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16264  # Macosx is osx and x86_64 is x64
16265  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16266    OPENJDK_BUILD_OS_BUNDLE="osx"
16267  else
16268    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16269  fi
16270  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16271    OPENJDK_BUILD_CPU_BUNDLE="x64"
16272  else
16273    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16274  fi
16275  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16276
16277
16278  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16279    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16280    # unpack200.exe. This variable is used in
16281    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16282    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16283      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16284    fi
16285  fi
16286
16287  if test "x$COMPILE_TYPE" = "xcross"; then
16288    # FIXME: ... or should this include reduced builds..?
16289    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16290  else
16291    DEFINE_CROSS_COMPILE_ARCH=""
16292  fi
16293
16294
16295  # Convert openjdk platform names to hotspot names
16296
16297  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16298  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16299    HOTSPOT_BUILD_OS=bsd
16300  fi
16301
16302
16303  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16304  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16305    HOTSPOT_BUILD_OS_TYPE=posix
16306  fi
16307
16308
16309  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16310  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16311    HOTSPOT_BUILD_CPU=x86_32
16312  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16313    HOTSPOT_BUILD_CPU=sparc
16314  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16315    HOTSPOT_BUILD_CPU=ppc_64
16316  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16317    HOTSPOT_BUILD_CPU=ppc_64
16318  fi
16319
16320
16321  # This is identical with OPENJDK_*, but define anyway for consistency.
16322  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16323
16324
16325  # Setup HOTSPOT_BUILD_CPU_DEFINE
16326  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16327    HOTSPOT_BUILD_CPU_DEFINE=IA32
16328  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16329    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16330  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16331    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16332  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16333    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16334  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16335    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16336  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16337    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16338
16339  # The cpu defines below are for zero, we don't support them directly.
16340  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16341    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16342  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16343    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16344  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16345    HOTSPOT_BUILD_CPU_DEFINE=S390
16346  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16347    HOTSPOT_BUILD_CPU_DEFINE=S390
16348  elif test "x$OPENJDK_BUILD_CPU" != x; then
16349    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16350  fi
16351
16352
16353
16354
16355
16356
16357# Continue setting up basic stuff. Most remaining code require fundamental tools.
16358
16359  # Save the current directory this script was started from
16360  CURDIR="$PWD"
16361
16362  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16363  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16364  # was not available at that time.
16365  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16366  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16367    ORIGINAL_PATH="$REWRITTEN_PATH"
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16369$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16370  fi
16371
16372  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16373    PATH_SEP=";"
16374
16375  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16376  if test $SRC_ROOT_LENGTH -gt 100; then
16377    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16378  fi
16379
16380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16382$as_echo_n "checking cygwin release... " >&6; }
16383    CYGWIN_VERSION=`$UNAME -r`
16384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16385$as_echo "$CYGWIN_VERSION" >&6; }
16386    WINDOWS_ENV_VENDOR='cygwin'
16387    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16388
16389    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16390    if test "x$CYGWIN_VERSION_OLD" != x; then
16391      { $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
16392$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;}
16393      as_fn_error $? "Cannot continue" "$LINENO" 5
16394    fi
16395    if test "x$CYGPATH" = x; then
16396      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16397    fi
16398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16399$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16400    # The cmd output ends with Windows line endings (CR/LF)
16401    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16402    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16403    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16405$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16406    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16407    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16408    if test "x$test_cygdrive_prefix" = x; then
16409      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16410    fi
16411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16413$as_echo_n "checking msys release... " >&6; }
16414    MSYS_VERSION=`$UNAME -r`
16415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16416$as_echo "$MSYS_VERSION" >&6; }
16417
16418    WINDOWS_ENV_VENDOR='msys'
16419    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16420
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16422$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16423    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16424    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16425
16426  windows_path="$MSYS_ROOT_PATH"
16427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16428    unix_path=`$CYGPATH -u "$windows_path"`
16429    MSYS_ROOT_PATH="$unix_path"
16430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16432    MSYS_ROOT_PATH="$unix_path"
16433  fi
16434
16435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16436$as_echo "$MSYS_ROOT_PATH" >&6; }
16437    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16438  else
16439    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16440  fi
16441
16442  # Test if windows or unix (cygwin/msys) find is first in path.
16443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16444$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16445  FIND_BINARY_OUTPUT=`find --version 2>&1`
16446  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16448$as_echo "unix style" >&6; }
16449  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16451$as_echo "Windows" >&6; }
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16453$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16454    { $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
16455$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16456    as_fn_error $? "Cannot continue" "$LINENO" 5
16457  else
16458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16459$as_echo "unknown" >&6; }
16460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16461$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16462  fi
16463
16464  else
16465    PATH_SEP=":"
16466  fi
16467
16468
16469  # We get the top-level directory from the supporting wrappers.
16470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16471$as_echo_n "checking for top-level directory... " >&6; }
16472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16473$as_echo "$TOPDIR" >&6; }
16474
16475
16476  # Save the original version of TOPDIR for string comparisons
16477  ORIGINAL_TOPDIR="$TOPDIR"
16478
16479
16480  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16481
16482  # Only process if variable expands to non-empty
16483
16484  if test "x$CURDIR" != x; then
16485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16486
16487  # Input might be given as Windows format, start by converting to
16488  # unix format.
16489  path="$CURDIR"
16490  new_path=`$CYGPATH -u "$path"`
16491
16492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16495  # "foo.exe" is OK but "foo" is an error.
16496  #
16497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16498  # It is also a way to make sure we got the proper file name for the real test later on.
16499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16500  if test "x$test_shortpath" = x; then
16501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16502$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16503    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16504  fi
16505
16506  # Call helper function which possibly converts this using DOS-style short mode.
16507  # If so, the updated path is stored in $new_path.
16508
16509  input_path="$new_path"
16510  # Check if we need to convert this using DOS-style short mode. If the path
16511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16512  # take no chances and rewrite it.
16513  # Note: m4 eats our [], so we need to use [ and ] instead.
16514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16515  if test "x$has_forbidden_chars" != x; then
16516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16520      # Going to short mode and back again did indeed matter. Since short mode is
16521      # case insensitive, let's make it lowercase to improve readability.
16522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16523      # Now convert it back to Unix-style (cygpath)
16524      input_path=`$CYGPATH -u "$shortmode_path"`
16525      new_path="$input_path"
16526    fi
16527  fi
16528
16529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16530  if test "x$test_cygdrive_prefix" = x; then
16531    # As a simple fix, exclude /usr/bin since it's not a real path.
16532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16534      # a path prefixed by /cygdrive for fixpath to work.
16535      new_path="$CYGWIN_ROOT_PATH$input_path"
16536    fi
16537  fi
16538
16539
16540  if test "x$path" != "x$new_path"; then
16541    CURDIR="$new_path"
16542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16543$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16544  fi
16545
16546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16547
16548  path="$CURDIR"
16549  has_colon=`$ECHO $path | $GREP ^.:`
16550  new_path="$path"
16551  if test "x$has_colon" = x; then
16552    # Not in mixed or Windows style, start by that.
16553    new_path=`cmd //c echo $path`
16554  fi
16555
16556
16557  input_path="$new_path"
16558  # Check if we need to convert this using DOS-style short mode. If the path
16559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16560  # take no chances and rewrite it.
16561  # Note: m4 eats our [], so we need to use [ and ] instead.
16562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16563  if test "x$has_forbidden_chars" != x; then
16564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16566  fi
16567
16568
16569  windows_path="$new_path"
16570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16571    unix_path=`$CYGPATH -u "$windows_path"`
16572    new_path="$unix_path"
16573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16575    new_path="$unix_path"
16576  fi
16577
16578  if test "x$path" != "x$new_path"; then
16579    CURDIR="$new_path"
16580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16581$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16582  fi
16583
16584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16586
16587    else
16588      # We're on a unix platform. Hooray! :)
16589      path="$CURDIR"
16590      has_space=`$ECHO "$path" | $GREP " "`
16591      if test "x$has_space" != x; then
16592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16593$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16595      fi
16596
16597      # Use eval to expand a potential ~
16598      eval path="$path"
16599      if test ! -f "$path" && test ! -d "$path"; then
16600        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16601      fi
16602
16603      if test -d "$path"; then
16604        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16605      else
16606        dir="`$DIRNAME "$path"`"
16607        base="`$BASENAME "$path"`"
16608        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16609      fi
16610    fi
16611  fi
16612
16613
16614  # Only process if variable expands to non-empty
16615
16616  if test "x$TOPDIR" != x; then
16617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16618
16619  # Input might be given as Windows format, start by converting to
16620  # unix format.
16621  path="$TOPDIR"
16622  new_path=`$CYGPATH -u "$path"`
16623
16624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16627  # "foo.exe" is OK but "foo" is an error.
16628  #
16629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16630  # It is also a way to make sure we got the proper file name for the real test later on.
16631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16632  if test "x$test_shortpath" = x; then
16633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16634$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16635    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16636  fi
16637
16638  # Call helper function which possibly converts this using DOS-style short mode.
16639  # If so, the updated path is stored in $new_path.
16640
16641  input_path="$new_path"
16642  # Check if we need to convert this using DOS-style short mode. If the path
16643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16644  # take no chances and rewrite it.
16645  # Note: m4 eats our [], so we need to use [ and ] instead.
16646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16647  if test "x$has_forbidden_chars" != x; then
16648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16652      # Going to short mode and back again did indeed matter. Since short mode is
16653      # case insensitive, let's make it lowercase to improve readability.
16654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16655      # Now convert it back to Unix-style (cygpath)
16656      input_path=`$CYGPATH -u "$shortmode_path"`
16657      new_path="$input_path"
16658    fi
16659  fi
16660
16661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16662  if test "x$test_cygdrive_prefix" = x; then
16663    # As a simple fix, exclude /usr/bin since it's not a real path.
16664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16666      # a path prefixed by /cygdrive for fixpath to work.
16667      new_path="$CYGWIN_ROOT_PATH$input_path"
16668    fi
16669  fi
16670
16671
16672  if test "x$path" != "x$new_path"; then
16673    TOPDIR="$new_path"
16674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16675$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16676  fi
16677
16678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16679
16680  path="$TOPDIR"
16681  has_colon=`$ECHO $path | $GREP ^.:`
16682  new_path="$path"
16683  if test "x$has_colon" = x; then
16684    # Not in mixed or Windows style, start by that.
16685    new_path=`cmd //c echo $path`
16686  fi
16687
16688
16689  input_path="$new_path"
16690  # Check if we need to convert this using DOS-style short mode. If the path
16691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16692  # take no chances and rewrite it.
16693  # Note: m4 eats our [], so we need to use [ and ] instead.
16694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16695  if test "x$has_forbidden_chars" != x; then
16696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16698  fi
16699
16700
16701  windows_path="$new_path"
16702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16703    unix_path=`$CYGPATH -u "$windows_path"`
16704    new_path="$unix_path"
16705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16707    new_path="$unix_path"
16708  fi
16709
16710  if test "x$path" != "x$new_path"; then
16711    TOPDIR="$new_path"
16712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16713$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16714  fi
16715
16716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16718
16719    else
16720      # We're on a unix platform. Hooray! :)
16721      path="$TOPDIR"
16722      has_space=`$ECHO "$path" | $GREP " "`
16723      if test "x$has_space" != x; then
16724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16725$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16727      fi
16728
16729      # Use eval to expand a potential ~
16730      eval path="$path"
16731      if test ! -f "$path" && test ! -d "$path"; then
16732        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16733      fi
16734
16735      if test -d "$path"; then
16736        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16737      else
16738        dir="`$DIRNAME "$path"`"
16739        base="`$BASENAME "$path"`"
16740        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16741      fi
16742    fi
16743  fi
16744
16745  # SRC_ROOT is a traditional alias for TOPDIR.
16746  SRC_ROOT=$TOPDIR
16747
16748  # Calculate a canonical version of TOPDIR for string comparisons
16749  CANONICAL_TOPDIR=$TOPDIR
16750
16751  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16752    # Follow a chain of symbolic links. Use readlink
16753    # where it exists, else fall back to horribly
16754    # complicated shell code.
16755    if test "x$READLINK_TESTED" != yes; then
16756      # On MacOSX there is a readlink tool with a different
16757      # purpose than the GNU readlink tool. Check the found readlink.
16758      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16759      if test "x$ISGNU" = x; then
16760        # A readlink that we do not know how to use.
16761        # Are there other non-GNU readlinks out there?
16762        READLINK_TESTED=yes
16763        READLINK=
16764      fi
16765    fi
16766
16767    if test "x$READLINK" != x; then
16768      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16769    else
16770      # Save the current directory for restoring afterwards
16771      STARTDIR=$PWD
16772      COUNTER=0
16773      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16774      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16775      cd $sym_link_dir
16776      # Use -P flag to resolve symlinks in directories.
16777      cd `$THEPWDCMD -P`
16778      sym_link_dir=`$THEPWDCMD -P`
16779      # Resolve file symlinks
16780      while test $COUNTER -lt 20; do
16781        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16782        if test "x$ISLINK" == x; then
16783          # This is not a symbolic link! We are done!
16784          break
16785        fi
16786        # Again resolve directory symlinks since the target of the just found
16787        # link could be in a different directory
16788        cd `$DIRNAME $ISLINK`
16789        sym_link_dir=`$THEPWDCMD -P`
16790        sym_link_file=`$BASENAME $ISLINK`
16791        let COUNTER=COUNTER+1
16792      done
16793      cd $STARTDIR
16794      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16795    fi
16796  fi
16797
16798
16799
16800  # Locate the directory of this script.
16801  AUTOCONF_DIR=$TOPDIR/common/autoconf
16802
16803  # Setup username (for use in adhoc version strings etc)
16804  # Outer [ ] to quote m4.
16805   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16806
16807
16808
16809# Check if it's a pure open build or if custom sources are to be used.
16810
16811  # Check whether --enable-openjdk-only was given.
16812if test "${enable_openjdk_only+set}" = set; then :
16813  enableval=$enable_openjdk_only;
16814else
16815  enable_openjdk_only="no"
16816fi
16817
16818
16819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16820$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16822$as_echo "$enable_openjdk_only" >&6; }
16823  if test "x$enable_openjdk_only" = "xyes"; then
16824    SUPPRESS_CUSTOM_EXTENSIONS="true"
16825  elif test "x$enable_openjdk_only" = "xno"; then
16826    SUPPRESS_CUSTOM_EXTENSIONS="false"
16827  else
16828    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16829  fi
16830
16831  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16832  # the IncludeCustomExtension macro.
16833
16834
16835# Check whether --with-custom-make-dir was given.
16836if test "${with_custom_make_dir+set}" = set; then :
16837  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
16838$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16839fi
16840
16841
16842
16843
16844# These are needed to be able to create a configuration name (and thus the output directory)
16845
16846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16847$as_echo_n "checking which variant of the JDK to build... " >&6; }
16848
16849# Check whether --with-jdk-variant was given.
16850if test "${with_jdk_variant+set}" = set; then :
16851  withval=$with_jdk_variant;
16852fi
16853
16854
16855  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16856    JDK_VARIANT="normal"
16857  else
16858    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16859  fi
16860
16861
16862
16863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16864$as_echo "$JDK_VARIANT" >&6; }
16865
16866
16867  DEBUG_LEVEL="release"
16868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16869$as_echo_n "checking which debug level to use... " >&6; }
16870  # Check whether --enable-debug was given.
16871if test "${enable_debug+set}" = set; then :
16872  enableval=$enable_debug;
16873        ENABLE_DEBUG="${enableval}"
16874        DEBUG_LEVEL="fastdebug"
16875
16876else
16877  ENABLE_DEBUG="no"
16878fi
16879
16880
16881
16882# Check whether --with-debug-level was given.
16883if test "${with_debug_level+set}" = set; then :
16884  withval=$with_debug_level;
16885        DEBUG_LEVEL="${withval}"
16886        if test "x$ENABLE_DEBUG" = xyes; then
16887          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16888        fi
16889
16890fi
16891
16892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16893$as_echo "$DEBUG_LEVEL" >&6; }
16894
16895  if test "x$DEBUG_LEVEL" != xrelease && \
16896      test "x$DEBUG_LEVEL" != xoptimized && \
16897      test "x$DEBUG_LEVEL" != xfastdebug && \
16898      test "x$DEBUG_LEVEL" != xslowdebug; then
16899    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16900  fi
16901
16902  # Translate DEBUG_LEVEL to debug level used by Hotspot
16903  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16904  if test "x$DEBUG_LEVEL" = xrelease; then
16905    HOTSPOT_DEBUG_LEVEL="product"
16906  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16907    HOTSPOT_DEBUG_LEVEL="debug"
16908  fi
16909
16910  if test "x$DEBUG_LEVEL" = xoptimized; then
16911    # The debug level 'optimized' is a little special because it is currently only
16912    # applicable to the HotSpot build where it means to build a completely
16913    # optimized version of the VM without any debugging code (like for the
16914    # 'release' debug level which is called 'product' in the HotSpot build) but
16915    # with the exception that it can contain additional code which is otherwise
16916    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16917    # test new and/or experimental features which are not intended for customer
16918    # shipment. Because these new features need to be tested and benchmarked in
16919    # real world scenarios, we want to build the containing JDK at the 'release'
16920    # debug level.
16921    DEBUG_LEVEL="release"
16922  fi
16923
16924
16925
16926
16927
16928
16929# Check whether --with-jvm-variants was given.
16930if test "${with_jvm_variants+set}" = set; then :
16931  withval=$with_jvm_variants;
16932fi
16933
16934
16935
16936
16937# Check whether --with-cpu-port was given.
16938if test "${with_cpu_port+set}" = set; then :
16939  withval=$with_cpu_port;
16940fi
16941
16942
16943  if test "x$with_cpu_port" != x; then
16944    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16945      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16946    fi
16947    if test "x$with_cpu_port" != xarm64 && \
16948        test "x$with_cpu_port" != xaarch64; then
16949      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16950    fi
16951    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16952  fi
16953
16954
16955  if test "x$with_jvm_variants" = x; then
16956    with_jvm_variants="server"
16957  fi
16958  JVM_VARIANTS_OPT="$with_jvm_variants"
16959
16960  # Has the user listed more than one variant?
16961  # Additional [] needed to keep m4 from mangling shell constructs.
16962  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16963    BUILDING_MULTIPLE_JVM_VARIANTS=true
16964  else
16965    BUILDING_MULTIPLE_JVM_VARIANTS=false
16966  fi
16967  # Replace the commas with AND for use in the build directory name.
16968  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16969
16970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16971$as_echo_n "checking which variants of the JVM to build... " >&6; }
16972  # JVM_VARIANTS is a space-separated list.
16973  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16974  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16976$as_echo "$JVM_VARIANTS" >&6; }
16977
16978  # Check that the selected variants are valid
16979
16980  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16981  # Notice that the original variant failes on SLES 10 and 11
16982  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16983  STACK=${JVM_VARIANTS// /$'\n'}
16984  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16985  if test "x$INVALID_VARIANTS" != x; then
16986    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16987$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16988    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16989  fi
16990
16991  # All "special" variants share the same output directory ("server")
16992  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16993  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16994  STACK=${JVM_VARIANTS// /$'\n'}
16995  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16996  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16997    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16998  fi
16999
17000  # The "main" variant is the one used by other libs to link against during the
17001  # build.
17002  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17003    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17004    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17005      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17006        JVM_VARIANT_MAIN="$variant"
17007        break
17008      fi
17009    done
17010  else
17011    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17012  fi
17013
17014
17015
17016
17017
17018  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17019    # zero behaves as a platform and rewrites these values. This is really weird. :(
17020    # We are guaranteed that we do not build any other variants when building zero.
17021    HOTSPOT_TARGET_CPU=zero
17022    HOTSPOT_TARGET_CPU_ARCH=zero
17023  fi
17024
17025
17026# With basic setup done, call the custom early hook.
17027
17028
17029# Check if we have devkits, extra paths or sysroot set.
17030
17031
17032# Check whether --with-devkit was given.
17033if test "${with_devkit+set}" = set; then :
17034  withval=$with_devkit;
17035
17036  # Only process if variable expands to non-empty
17037
17038  if test "x$with_devkit" != x; then
17039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17040
17041  # Input might be given as Windows format, start by converting to
17042  # unix format.
17043  path="$with_devkit"
17044  new_path=`$CYGPATH -u "$path"`
17045
17046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17049  # "foo.exe" is OK but "foo" is an error.
17050  #
17051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17052  # It is also a way to make sure we got the proper file name for the real test later on.
17053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17054  if test "x$test_shortpath" = x; then
17055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17056$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17057    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17058  fi
17059
17060  # Call helper function which possibly converts this using DOS-style short mode.
17061  # If so, the updated path is stored in $new_path.
17062
17063  input_path="$new_path"
17064  # Check if we need to convert this using DOS-style short mode. If the path
17065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17066  # take no chances and rewrite it.
17067  # Note: m4 eats our [], so we need to use [ and ] instead.
17068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17069  if test "x$has_forbidden_chars" != x; then
17070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17074      # Going to short mode and back again did indeed matter. Since short mode is
17075      # case insensitive, let's make it lowercase to improve readability.
17076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17077      # Now convert it back to Unix-style (cygpath)
17078      input_path=`$CYGPATH -u "$shortmode_path"`
17079      new_path="$input_path"
17080    fi
17081  fi
17082
17083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17084  if test "x$test_cygdrive_prefix" = x; then
17085    # As a simple fix, exclude /usr/bin since it's not a real path.
17086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17088      # a path prefixed by /cygdrive for fixpath to work.
17089      new_path="$CYGWIN_ROOT_PATH$input_path"
17090    fi
17091  fi
17092
17093
17094  if test "x$path" != "x$new_path"; then
17095    with_devkit="$new_path"
17096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17097$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17098  fi
17099
17100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17101
17102  path="$with_devkit"
17103  has_colon=`$ECHO $path | $GREP ^.:`
17104  new_path="$path"
17105  if test "x$has_colon" = x; then
17106    # Not in mixed or Windows style, start by that.
17107    new_path=`cmd //c echo $path`
17108  fi
17109
17110
17111  input_path="$new_path"
17112  # Check if we need to convert this using DOS-style short mode. If the path
17113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17114  # take no chances and rewrite it.
17115  # Note: m4 eats our [], so we need to use [ and ] instead.
17116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17117  if test "x$has_forbidden_chars" != x; then
17118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17120  fi
17121
17122
17123  windows_path="$new_path"
17124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17125    unix_path=`$CYGPATH -u "$windows_path"`
17126    new_path="$unix_path"
17127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17129    new_path="$unix_path"
17130  fi
17131
17132  if test "x$path" != "x$new_path"; then
17133    with_devkit="$new_path"
17134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17135$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17136  fi
17137
17138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17140
17141    else
17142      # We're on a unix platform. Hooray! :)
17143      path="$with_devkit"
17144      has_space=`$ECHO "$path" | $GREP " "`
17145      if test "x$has_space" != x; then
17146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17147$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17149      fi
17150
17151      # Use eval to expand a potential ~
17152      eval path="$path"
17153      if test ! -f "$path" && test ! -d "$path"; then
17154        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17155      fi
17156
17157      if test -d "$path"; then
17158        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17159      else
17160        dir="`$DIRNAME "$path"`"
17161        base="`$BASENAME "$path"`"
17162        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17163      fi
17164    fi
17165  fi
17166
17167        DEVKIT_ROOT="$with_devkit"
17168        # Check for a meta data info file in the root of the devkit
17169        if test -f "$DEVKIT_ROOT/devkit.info"; then
17170          . $DEVKIT_ROOT/devkit.info
17171          # This potentially sets the following:
17172          # A descriptive name of the devkit
17173
17174  if test "x$DEVKIT_NAME" = x; then
17175    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17176  fi
17177
17178          # Corresponds to --with-extra-path
17179
17180  if test "x$DEVKIT_EXTRA_PATH" = x; then
17181    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17182  fi
17183
17184          # Corresponds to --with-toolchain-path
17185
17186  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17187    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17188  fi
17189
17190          # Corresponds to --with-sysroot
17191
17192  if test "x$DEVKIT_SYSROOT" = x; then
17193    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17194  fi
17195
17196
17197          # Identifies the Visual Studio version in the devkit
17198
17199  if test "x$DEVKIT_VS_VERSION" = x; then
17200    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17201  fi
17202
17203          # The Visual Studio include environment variable
17204
17205  if test "x$DEVKIT_VS_INCLUDE" = x; then
17206    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17207  fi
17208
17209          # The Visual Studio lib environment variable
17210
17211  if test "x$DEVKIT_VS_LIB" = x; then
17212    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17213  fi
17214
17215          # Corresponds to --with-msvcr-dll
17216
17217  if test "x$DEVKIT_MSVCR_DLL" = x; then
17218    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17219  fi
17220
17221          # Corresponds to --with-msvcp-dll
17222
17223  if test "x$DEVKIT_MSVCP_DLL" = x; then
17224    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17225  fi
17226
17227        fi
17228
17229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17230$as_echo_n "checking for devkit... " >&6; }
17231        if test "x$DEVKIT_NAME" != x; then
17232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17233$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17234        else
17235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17236$as_echo "$DEVKIT_ROOT" >&6; }
17237        fi
17238
17239
17240  if test "x$DEVKIT_EXTRA_PATH" != x; then
17241    if test "x$EXTRA_PATH" = x; then
17242      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17243    else
17244      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17245    fi
17246  fi
17247
17248
17249        # Fallback default of just /bin if DEVKIT_PATH is not defined
17250        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17251          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17252        fi
17253
17254  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17255    if test "x$TOOLCHAIN_PATH" = x; then
17256      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17257    else
17258      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17259    fi
17260  fi
17261
17262
17263        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17264        # places for backwards compatiblity.
17265        if test "x$DEVKIT_SYSROOT" != x; then
17266          SYSROOT="$DEVKIT_SYSROOT"
17267        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17268          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17269        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17270          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17271        fi
17272
17273
17274fi
17275
17276
17277  # You can force the sysroot if the sysroot encoded into the compiler tools
17278  # is not correct.
17279
17280# Check whether --with-sys-root was given.
17281if test "${with_sys_root+set}" = set; then :
17282  withval=$with_sys_root; SYSROOT=$with_sys_root
17283
17284fi
17285
17286
17287
17288# Check whether --with-sysroot was given.
17289if test "${with_sysroot+set}" = set; then :
17290  withval=$with_sysroot; SYSROOT=$with_sysroot
17291
17292fi
17293
17294
17295
17296# Check whether --with-tools-dir was given.
17297if test "${with_tools_dir+set}" = set; then :
17298  withval=$with_tools_dir;
17299  if test "x$with_tools_dir" != x; then
17300    if test "x$TOOLCHAIN_PATH" = x; then
17301      TOOLCHAIN_PATH="$with_tools_dir"
17302    else
17303      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17304    fi
17305  fi
17306
17307
17308fi
17309
17310
17311
17312# Check whether --with-toolchain-path was given.
17313if test "${with_toolchain_path+set}" = set; then :
17314  withval=$with_toolchain_path;
17315  if test "x$with_toolchain_path" != x; then
17316    if test "x$TOOLCHAIN_PATH" = x; then
17317      TOOLCHAIN_PATH="$with_toolchain_path"
17318    else
17319      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17320    fi
17321  fi
17322
17323
17324fi
17325
17326
17327
17328# Check whether --with-extra-path was given.
17329if test "${with_extra_path+set}" = set; then :
17330  withval=$with_extra_path;
17331  if test "x$with_extra_path" != x; then
17332    if test "x$EXTRA_PATH" = x; then
17333      EXTRA_PATH="$with_extra_path"
17334    else
17335      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17336    fi
17337  fi
17338
17339
17340fi
17341
17342
17343  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17344    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17345    # If not, detect if Xcode is installed by running xcodebuild -version
17346    # if no Xcode installed, xcodebuild exits with 1
17347    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17348    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17349      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17350      # fall back on the stub binary in /usr/bin/xcodebuild
17351      # Extract the first word of "xcodebuild", so it can be a program name with args.
17352set dummy xcodebuild; ac_word=$2
17353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17354$as_echo_n "checking for $ac_word... " >&6; }
17355if ${ac_cv_path_XCODEBUILD+:} false; then :
17356  $as_echo_n "(cached) " >&6
17357else
17358  case $XCODEBUILD in
17359  [\\/]* | ?:[\\/]*)
17360  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17361  ;;
17362  *)
17363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17364for as_dir in $TOOLCHAIN_PATH
17365do
17366  IFS=$as_save_IFS
17367  test -z "$as_dir" && as_dir=.
17368    for ac_exec_ext in '' $ac_executable_extensions; do
17369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17370    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17372    break 2
17373  fi
17374done
17375  done
17376IFS=$as_save_IFS
17377
17378  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17379  ;;
17380esac
17381fi
17382XCODEBUILD=$ac_cv_path_XCODEBUILD
17383if test -n "$XCODEBUILD"; then
17384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17385$as_echo "$XCODEBUILD" >&6; }
17386else
17387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17388$as_echo "no" >&6; }
17389fi
17390
17391
17392    else
17393      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17394      # when only the command line tools are installed there are no SDKs, so headers
17395      # are copied into the system frameworks
17396      XCODEBUILD=
17397
17398    fi
17399
17400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17401$as_echo_n "checking for sdk name... " >&6; }
17402
17403# Check whether --with-sdk-name was given.
17404if test "${with_sdk_name+set}" = set; then :
17405  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17406
17407fi
17408
17409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17410$as_echo "$SDKNAME" >&6; }
17411
17412    # if toolchain path is specified then don't rely on system headers, they may not compile
17413    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17414    test -z "$TOOLCHAIN_PATH" && \
17415      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17416
17417    if test -z "$SYSROOT"; then
17418      if test -n "$XCODEBUILD"; then
17419        # if we don't have system headers, use default SDK name (last resort)
17420        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17421          SDKNAME=${SDKNAME:-macosx}
17422        fi
17423
17424        if test -n "$SDKNAME"; then
17425          # Call xcodebuild to determine SYSROOT
17426          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17427        fi
17428      else
17429        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17430          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
17431        fi
17432      fi
17433    else
17434      # warn user if --with-sdk-name was also set
17435      if test -n "$with_sdk_name"; then
17436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17437$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17438      fi
17439    fi
17440
17441    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17442      # If no system framework headers, then SYSROOT must be set, or we won't build
17443      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
17444    fi
17445
17446    # Perform a basic sanity test
17447    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17448      if test -z "$SYSROOT"; then
17449        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
17450      else
17451        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17452      fi
17453    fi
17454
17455    # set SDKROOT too, Xcode tools will pick it up
17456    SDKROOT="$SYSROOT"
17457
17458  fi
17459
17460  # Prepend the extra path to the global path
17461
17462  if test "x$EXTRA_PATH" != x; then
17463    if test "x$PATH" = x; then
17464      PATH="$EXTRA_PATH"
17465    else
17466      PATH="$EXTRA_PATH:$PATH"
17467    fi
17468  fi
17469
17470
17471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17472$as_echo_n "checking for sysroot... " >&6; }
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17474$as_echo "$SYSROOT" >&6; }
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17476$as_echo_n "checking for toolchain path... " >&6; }
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17478$as_echo "$TOOLCHAIN_PATH" >&6; }
17479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17480$as_echo_n "checking for extra path... " >&6; }
17481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17482$as_echo "$EXTRA_PATH" >&6; }
17483
17484
17485# To properly create a configuration name, we need to have the OpenJDK target
17486# and options (variants and debug level) parsed.
17487
17488
17489
17490# Check whether --with-conf-name was given.
17491if test "${with_conf_name+set}" = set; then :
17492  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17493fi
17494
17495
17496  # Test from where we are running configure, in or outside of src root.
17497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17498$as_echo_n "checking where to store configuration... " >&6; }
17499  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17500      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17501      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17502    # We are running configure from the src root.
17503    # Create a default ./build/target-variant-debuglevel output root.
17504    if test "x${CONF_NAME}" = x; then
17505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17506$as_echo "in default location" >&6; }
17507      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17508    else
17509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17510$as_echo "in build directory with custom name" >&6; }
17511    fi
17512    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17513    $MKDIR -p "$OUTPUT_ROOT"
17514    if test ! -d "$OUTPUT_ROOT"; then
17515      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17516    fi
17517  else
17518    # We are running configure from outside of the src dir.
17519    # Then use the current directory as output dir!
17520    # If configuration is situated in normal build directory, just use the build
17521    # directory name as configuration name, otherwise use the complete path.
17522    if test "x${CONF_NAME}" = x; then
17523      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17524    fi
17525    OUTPUT_ROOT="$CURDIR"
17526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17527$as_echo "in current directory" >&6; }
17528
17529    # WARNING: This might be a bad thing to do. You need to be sure you want to
17530    # have a configuration in this directory. Do some sanity checks!
17531
17532    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17533      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17534      # other files
17535      files_present=`$LS $OUTPUT_ROOT`
17536      # Configure has already touched config.log and confdefs.h in the current dir when this check
17537      # is performed.
17538      filtered_files=`$ECHO "$files_present" \
17539          | $SED -e 's/config.log//g' \
17540              -e 's/configure.log//g' \
17541              -e 's/confdefs.h//g' \
17542              -e 's/ //g' \
17543          | $TR -d '\n'`
17544      if test "x$filtered_files" != x; then
17545        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17546$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17547        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17548$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17549        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17550$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17551        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17552$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17553        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17554$as_echo "$as_me: seriously mess up just about everything." >&6;}
17555        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17556$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17557        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17558$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17559        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17560      fi
17561    fi
17562  fi
17563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17564$as_echo_n "checking what configuration name to use... " >&6; }
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17566$as_echo "$CONF_NAME" >&6; }
17567
17568
17569  # Only process if variable expands to non-empty
17570
17571  if test "x$OUTPUT_ROOT" != x; then
17572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17573
17574  # Input might be given as Windows format, start by converting to
17575  # unix format.
17576  path="$OUTPUT_ROOT"
17577  new_path=`$CYGPATH -u "$path"`
17578
17579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17582  # "foo.exe" is OK but "foo" is an error.
17583  #
17584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17585  # It is also a way to make sure we got the proper file name for the real test later on.
17586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17587  if test "x$test_shortpath" = x; then
17588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17589$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17590    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17591  fi
17592
17593  # Call helper function which possibly converts this using DOS-style short mode.
17594  # If so, the updated path is stored in $new_path.
17595
17596  input_path="$new_path"
17597  # Check if we need to convert this using DOS-style short mode. If the path
17598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17599  # take no chances and rewrite it.
17600  # Note: m4 eats our [], so we need to use [ and ] instead.
17601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17602  if test "x$has_forbidden_chars" != x; then
17603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17607      # Going to short mode and back again did indeed matter. Since short mode is
17608      # case insensitive, let's make it lowercase to improve readability.
17609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17610      # Now convert it back to Unix-style (cygpath)
17611      input_path=`$CYGPATH -u "$shortmode_path"`
17612      new_path="$input_path"
17613    fi
17614  fi
17615
17616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17617  if test "x$test_cygdrive_prefix" = x; then
17618    # As a simple fix, exclude /usr/bin since it's not a real path.
17619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17621      # a path prefixed by /cygdrive for fixpath to work.
17622      new_path="$CYGWIN_ROOT_PATH$input_path"
17623    fi
17624  fi
17625
17626
17627  if test "x$path" != "x$new_path"; then
17628    OUTPUT_ROOT="$new_path"
17629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17630$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17631  fi
17632
17633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17634
17635  path="$OUTPUT_ROOT"
17636  has_colon=`$ECHO $path | $GREP ^.:`
17637  new_path="$path"
17638  if test "x$has_colon" = x; then
17639    # Not in mixed or Windows style, start by that.
17640    new_path=`cmd //c echo $path`
17641  fi
17642
17643
17644  input_path="$new_path"
17645  # Check if we need to convert this using DOS-style short mode. If the path
17646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17647  # take no chances and rewrite it.
17648  # Note: m4 eats our [], so we need to use [ and ] instead.
17649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17650  if test "x$has_forbidden_chars" != x; then
17651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17653  fi
17654
17655
17656  windows_path="$new_path"
17657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17658    unix_path=`$CYGPATH -u "$windows_path"`
17659    new_path="$unix_path"
17660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17662    new_path="$unix_path"
17663  fi
17664
17665  if test "x$path" != "x$new_path"; then
17666    OUTPUT_ROOT="$new_path"
17667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17668$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17669  fi
17670
17671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17673
17674    else
17675      # We're on a unix platform. Hooray! :)
17676      path="$OUTPUT_ROOT"
17677      has_space=`$ECHO "$path" | $GREP " "`
17678      if test "x$has_space" != x; then
17679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17680$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17682      fi
17683
17684      # Use eval to expand a potential ~
17685      eval path="$path"
17686      if test ! -f "$path" && test ! -d "$path"; then
17687        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17688      fi
17689
17690      if test -d "$path"; then
17691        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17692      else
17693        dir="`$DIRNAME "$path"`"
17694        base="`$BASENAME "$path"`"
17695        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17696      fi
17697    fi
17698  fi
17699
17700
17701  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17702  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17703
17704  SPEC="$OUTPUT_ROOT/spec.gmk"
17705
17706
17707
17708
17709
17710  # The spec.gmk file contains all variables for the make system.
17711  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17712
17713  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17714  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17715
17716  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17717  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17718
17719  # The compare.sh is used to compare the build output to other builds.
17720  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17721
17722  # The generated Makefile knows where the spec.gmk is and where the source is.
17723  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17724  # which will look for generated configurations
17725  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17726
17727
17728
17729# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17730
17731  for ac_prog in apt-get yum brew port pkgutil pkgadd
17732do
17733  # Extract the first word of "$ac_prog", so it can be a program name with args.
17734set dummy $ac_prog; ac_word=$2
17735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17736$as_echo_n "checking for $ac_word... " >&6; }
17737if ${ac_cv_prog_PKGHANDLER+:} false; then :
17738  $as_echo_n "(cached) " >&6
17739else
17740  if test -n "$PKGHANDLER"; then
17741  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17742else
17743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17744for as_dir in $PATH
17745do
17746  IFS=$as_save_IFS
17747  test -z "$as_dir" && as_dir=.
17748    for ac_exec_ext in '' $ac_executable_extensions; do
17749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17750    ac_cv_prog_PKGHANDLER="$ac_prog"
17751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17752    break 2
17753  fi
17754done
17755  done
17756IFS=$as_save_IFS
17757
17758fi
17759fi
17760PKGHANDLER=$ac_cv_prog_PKGHANDLER
17761if test -n "$PKGHANDLER"; then
17762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17763$as_echo "$PKGHANDLER" >&6; }
17764else
17765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17766$as_echo "no" >&6; }
17767fi
17768
17769
17770  test -n "$PKGHANDLER" && break
17771done
17772
17773
17774
17775# Setup tools that requires more complex handling, or that is not needed by the configure script.
17776
17777
17778
17779  # Publish this variable in the help.
17780
17781
17782  if [ -z "${MAKE+x}" ]; then
17783    # The variable is not set by user, try to locate tool using the code snippet
17784
17785    # Try our hardest to locate a correct version of GNU make
17786    for ac_prog in gmake
17787do
17788  # Extract the first word of "$ac_prog", so it can be a program name with args.
17789set dummy $ac_prog; ac_word=$2
17790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17791$as_echo_n "checking for $ac_word... " >&6; }
17792if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17793  $as_echo_n "(cached) " >&6
17794else
17795  case $CHECK_GMAKE in
17796  [\\/]* | ?:[\\/]*)
17797  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17798  ;;
17799  *)
17800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17801for as_dir in $PATH
17802do
17803  IFS=$as_save_IFS
17804  test -z "$as_dir" && as_dir=.
17805    for ac_exec_ext in '' $ac_executable_extensions; do
17806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17807    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17809    break 2
17810  fi
17811done
17812  done
17813IFS=$as_save_IFS
17814
17815  ;;
17816esac
17817fi
17818CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17819if test -n "$CHECK_GMAKE"; then
17820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17821$as_echo "$CHECK_GMAKE" >&6; }
17822else
17823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17824$as_echo "no" >&6; }
17825fi
17826
17827
17828  test -n "$CHECK_GMAKE" && break
17829done
17830
17831
17832  MAKE_CANDIDATE=""$CHECK_GMAKE""
17833  DESCRIPTION="gmake in PATH"
17834
17835  # On Cygwin, we require a newer version of make than on other platforms
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837    MAKE_VERSION_EXPR="-e 4\."
17838    MAKE_REQUIRED_VERSION="4.0"
17839   else
17840    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17841    MAKE_REQUIRED_VERSION="3.81"
17842  fi
17843
17844  if test "x$MAKE_CANDIDATE" != x; then
17845    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17846$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17847    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17848    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17849    if test "x$IS_GNU_MAKE" = x; then
17850      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17851$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17852    else
17853      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17854      if test "x$IS_MODERN_MAKE" = x; then
17855        { $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
17856$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;}
17857      else
17858        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17859          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17860            MAKE_EXPECTED_ENV='cygwin'
17861          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17862            MAKE_EXPECTED_ENV='msys'
17863          else
17864            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17865          fi
17866          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17867          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17868        else
17869          # Not relevant for non-Windows
17870          IS_MAKE_CORRECT_ENV=true
17871        fi
17872        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17873          { $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
17874$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;}
17875        else
17876          FOUND_MAKE=$MAKE_CANDIDATE
17877
17878  # Only process if variable expands to non-empty
17879
17880  if test "x$FOUND_MAKE" != x; then
17881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17882
17883  # First separate the path from the arguments. This will split at the first
17884  # space.
17885  complete="$FOUND_MAKE"
17886  path="${complete%% *}"
17887  tmp="$complete EOL"
17888  arguments="${tmp#* }"
17889
17890  # Input might be given as Windows format, start by converting to
17891  # unix format.
17892  new_path=`$CYGPATH -u "$path"`
17893
17894  # Now try to locate executable using which
17895  new_path=`$WHICH "$new_path" 2> /dev/null`
17896  # bat and cmd files are not always considered executable in cygwin causing which
17897  # to not find them
17898  if test "x$new_path" = x \
17899      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17900      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17901    new_path=`$CYGPATH -u "$path"`
17902  fi
17903  if test "x$new_path" = x; then
17904    # Oops. Which didn't find the executable.
17905    # The splitting of arguments from the executable at a space might have been incorrect,
17906    # since paths with space are more likely in Windows. Give it another try with the whole
17907    # argument.
17908    path="$complete"
17909    arguments="EOL"
17910    new_path=`$CYGPATH -u "$path"`
17911    new_path=`$WHICH "$new_path" 2> /dev/null`
17912    # bat and cmd files are not always considered executable in cygwin causing which
17913    # to not find them
17914    if test "x$new_path" = x \
17915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17917      new_path=`$CYGPATH -u "$path"`
17918    fi
17919    if test "x$new_path" = x; then
17920      # It's still not found. Now this is an unrecoverable error.
17921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17922$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17923      has_space=`$ECHO "$complete" | $GREP " "`
17924      if test "x$has_space" != x; then
17925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17927      fi
17928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17929    fi
17930  fi
17931
17932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17935  # "foo.exe" is OK but "foo" is an error.
17936  #
17937  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17938  # It is also a way to make sure we got the proper file name for the real test later on.
17939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17940  if test "x$test_shortpath" = x; then
17941    # Short path failed, file does not exist as specified.
17942    # Try adding .exe or .cmd
17943    if test -f "${new_path}.exe"; then
17944      input_to_shortpath="${new_path}.exe"
17945    elif test -f "${new_path}.cmd"; then
17946      input_to_shortpath="${new_path}.cmd"
17947    else
17948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17949$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17950      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17951$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17952      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17953    fi
17954  else
17955    input_to_shortpath="$new_path"
17956  fi
17957
17958  # Call helper function which possibly converts this using DOS-style short mode.
17959  # If so, the updated path is stored in $new_path.
17960  new_path="$input_to_shortpath"
17961
17962  input_path="$input_to_shortpath"
17963  # Check if we need to convert this using DOS-style short mode. If the path
17964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17965  # take no chances and rewrite it.
17966  # Note: m4 eats our [], so we need to use [ and ] instead.
17967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17968  if test "x$has_forbidden_chars" != x; then
17969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17973      # Going to short mode and back again did indeed matter. Since short mode is
17974      # case insensitive, let's make it lowercase to improve readability.
17975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17976      # Now convert it back to Unix-style (cygpath)
17977      input_path=`$CYGPATH -u "$shortmode_path"`
17978      new_path="$input_path"
17979    fi
17980  fi
17981
17982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17983  if test "x$test_cygdrive_prefix" = x; then
17984    # As a simple fix, exclude /usr/bin since it's not a real path.
17985    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17987      # a path prefixed by /cygdrive for fixpath to work.
17988      new_path="$CYGWIN_ROOT_PATH$input_path"
17989    fi
17990  fi
17991
17992  # remove trailing .exe if any
17993  new_path="${new_path/%.exe/}"
17994
17995    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17996
17997  # First separate the path from the arguments. This will split at the first
17998  # space.
17999  complete="$FOUND_MAKE"
18000  path="${complete%% *}"
18001  tmp="$complete EOL"
18002  arguments="${tmp#* }"
18003
18004  # Input might be given as Windows format, start by converting to
18005  # unix format.
18006  new_path="$path"
18007
18008  windows_path="$new_path"
18009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18010    unix_path=`$CYGPATH -u "$windows_path"`
18011    new_path="$unix_path"
18012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18014    new_path="$unix_path"
18015  fi
18016
18017
18018  # Now try to locate executable using which
18019  new_path=`$WHICH "$new_path" 2> /dev/null`
18020
18021  if test "x$new_path" = x; then
18022    # Oops. Which didn't find the executable.
18023    # The splitting of arguments from the executable at a space might have been incorrect,
18024    # since paths with space are more likely in Windows. Give it another try with the whole
18025    # argument.
18026    path="$complete"
18027    arguments="EOL"
18028    new_path="$path"
18029
18030  windows_path="$new_path"
18031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18032    unix_path=`$CYGPATH -u "$windows_path"`
18033    new_path="$unix_path"
18034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18036    new_path="$unix_path"
18037  fi
18038
18039
18040    new_path=`$WHICH "$new_path" 2> /dev/null`
18041    # bat and cmd files are not always considered executable in MSYS causing which
18042    # to not find them
18043    if test "x$new_path" = x \
18044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18046      new_path="$path"
18047
18048  windows_path="$new_path"
18049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18050    unix_path=`$CYGPATH -u "$windows_path"`
18051    new_path="$unix_path"
18052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18054    new_path="$unix_path"
18055  fi
18056
18057    fi
18058
18059    if test "x$new_path" = x; then
18060      # It's still not found. Now this is an unrecoverable error.
18061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18062$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18063      has_space=`$ECHO "$complete" | $GREP " "`
18064      if test "x$has_space" != x; then
18065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18067      fi
18068      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18069    fi
18070  fi
18071
18072  # Now new_path has a complete unix path to the binary
18073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18074    # Keep paths in /bin as-is, but remove trailing .exe if any
18075    new_path="${new_path/%.exe/}"
18076    # Do not save /bin paths to all_fixpath_prefixes!
18077  else
18078    # Not in mixed or Windows style, start by that.
18079    new_path=`cmd //c echo $new_path`
18080
18081  input_path="$new_path"
18082  # Check if we need to convert this using DOS-style short mode. If the path
18083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18084  # take no chances and rewrite it.
18085  # Note: m4 eats our [], so we need to use [ and ] instead.
18086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18087  if test "x$has_forbidden_chars" != x; then
18088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18090  fi
18091
18092    # Output is in $new_path
18093
18094  windows_path="$new_path"
18095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18096    unix_path=`$CYGPATH -u "$windows_path"`
18097    new_path="$unix_path"
18098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18100    new_path="$unix_path"
18101  fi
18102
18103    # remove trailing .exe if any
18104    new_path="${new_path/%.exe/}"
18105
18106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18108  fi
18109
18110    else
18111      # We're on a unix platform. Hooray! :)
18112      # First separate the path from the arguments. This will split at the first
18113      # space.
18114      complete="$FOUND_MAKE"
18115      path="${complete%% *}"
18116      tmp="$complete EOL"
18117      arguments="${tmp#* }"
18118
18119      # Cannot rely on the command "which" here since it doesn't always work.
18120      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18121      if test -z "$is_absolute_path"; then
18122        # Path to executable is not absolute. Find it.
18123        IFS_save="$IFS"
18124        IFS=:
18125        for p in $PATH; do
18126          if test -f "$p/$path" && test -x "$p/$path"; then
18127            new_path="$p/$path"
18128            break
18129          fi
18130        done
18131        IFS="$IFS_save"
18132      else
18133        # This is an absolute path, we can use it without further modifications.
18134        new_path="$path"
18135      fi
18136
18137      if test "x$new_path" = x; then
18138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18139$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18140        has_space=`$ECHO "$complete" | $GREP " "`
18141        if test "x$has_space" != x; then
18142          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18143$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18144        fi
18145        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18146      fi
18147    fi
18148
18149    # Now join together the path and the arguments once again
18150    if test "x$arguments" != xEOL; then
18151      new_complete="$new_path ${arguments% *}"
18152    else
18153      new_complete="$new_path"
18154    fi
18155
18156    if test "x$complete" != "x$new_complete"; then
18157      FOUND_MAKE="$new_complete"
18158      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18159$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18160    fi
18161  fi
18162
18163        fi
18164      fi
18165    fi
18166  fi
18167
18168
18169    if test "x$FOUND_MAKE" = x; then
18170      for ac_prog in make
18171do
18172  # Extract the first word of "$ac_prog", so it can be a program name with args.
18173set dummy $ac_prog; ac_word=$2
18174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18175$as_echo_n "checking for $ac_word... " >&6; }
18176if ${ac_cv_path_CHECK_MAKE+:} false; then :
18177  $as_echo_n "(cached) " >&6
18178else
18179  case $CHECK_MAKE in
18180  [\\/]* | ?:[\\/]*)
18181  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18182  ;;
18183  *)
18184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18185for as_dir in $PATH
18186do
18187  IFS=$as_save_IFS
18188  test -z "$as_dir" && as_dir=.
18189    for ac_exec_ext in '' $ac_executable_extensions; do
18190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18191    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18193    break 2
18194  fi
18195done
18196  done
18197IFS=$as_save_IFS
18198
18199  ;;
18200esac
18201fi
18202CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18203if test -n "$CHECK_MAKE"; then
18204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18205$as_echo "$CHECK_MAKE" >&6; }
18206else
18207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18208$as_echo "no" >&6; }
18209fi
18210
18211
18212  test -n "$CHECK_MAKE" && break
18213done
18214
18215
18216  MAKE_CANDIDATE=""$CHECK_MAKE""
18217  DESCRIPTION="make in PATH"
18218
18219  # On Cygwin, we require a newer version of make than on other platforms
18220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18221    MAKE_VERSION_EXPR="-e 4\."
18222    MAKE_REQUIRED_VERSION="4.0"
18223   else
18224    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18225    MAKE_REQUIRED_VERSION="3.81"
18226  fi
18227
18228  if test "x$MAKE_CANDIDATE" != x; then
18229    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18230$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18231    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18232    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18233    if test "x$IS_GNU_MAKE" = x; then
18234      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18235$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18236    else
18237      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18238      if test "x$IS_MODERN_MAKE" = x; then
18239        { $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
18240$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;}
18241      else
18242        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18243          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18244            MAKE_EXPECTED_ENV='cygwin'
18245          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18246            MAKE_EXPECTED_ENV='msys'
18247          else
18248            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18249          fi
18250          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18251          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18252        else
18253          # Not relevant for non-Windows
18254          IS_MAKE_CORRECT_ENV=true
18255        fi
18256        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18257          { $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
18258$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;}
18259        else
18260          FOUND_MAKE=$MAKE_CANDIDATE
18261
18262  # Only process if variable expands to non-empty
18263
18264  if test "x$FOUND_MAKE" != x; then
18265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18266
18267  # First separate the path from the arguments. This will split at the first
18268  # space.
18269  complete="$FOUND_MAKE"
18270  path="${complete%% *}"
18271  tmp="$complete EOL"
18272  arguments="${tmp#* }"
18273
18274  # Input might be given as Windows format, start by converting to
18275  # unix format.
18276  new_path=`$CYGPATH -u "$path"`
18277
18278  # Now try to locate executable using which
18279  new_path=`$WHICH "$new_path" 2> /dev/null`
18280  # bat and cmd files are not always considered executable in cygwin causing which
18281  # to not find them
18282  if test "x$new_path" = x \
18283      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18284      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18285    new_path=`$CYGPATH -u "$path"`
18286  fi
18287  if test "x$new_path" = x; then
18288    # Oops. Which didn't find the executable.
18289    # The splitting of arguments from the executable at a space might have been incorrect,
18290    # since paths with space are more likely in Windows. Give it another try with the whole
18291    # argument.
18292    path="$complete"
18293    arguments="EOL"
18294    new_path=`$CYGPATH -u "$path"`
18295    new_path=`$WHICH "$new_path" 2> /dev/null`
18296    # bat and cmd files are not always considered executable in cygwin causing which
18297    # to not find them
18298    if test "x$new_path" = x \
18299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18301      new_path=`$CYGPATH -u "$path"`
18302    fi
18303    if test "x$new_path" = x; then
18304      # It's still not found. Now this is an unrecoverable error.
18305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18306$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18307      has_space=`$ECHO "$complete" | $GREP " "`
18308      if test "x$has_space" != x; then
18309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18311      fi
18312      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18313    fi
18314  fi
18315
18316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18319  # "foo.exe" is OK but "foo" is an error.
18320  #
18321  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18322  # It is also a way to make sure we got the proper file name for the real test later on.
18323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18324  if test "x$test_shortpath" = x; then
18325    # Short path failed, file does not exist as specified.
18326    # Try adding .exe or .cmd
18327    if test -f "${new_path}.exe"; then
18328      input_to_shortpath="${new_path}.exe"
18329    elif test -f "${new_path}.cmd"; then
18330      input_to_shortpath="${new_path}.cmd"
18331    else
18332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18333$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18336      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18337    fi
18338  else
18339    input_to_shortpath="$new_path"
18340  fi
18341
18342  # Call helper function which possibly converts this using DOS-style short mode.
18343  # If so, the updated path is stored in $new_path.
18344  new_path="$input_to_shortpath"
18345
18346  input_path="$input_to_shortpath"
18347  # Check if we need to convert this using DOS-style short mode. If the path
18348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18349  # take no chances and rewrite it.
18350  # Note: m4 eats our [], so we need to use [ and ] instead.
18351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18352  if test "x$has_forbidden_chars" != x; then
18353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18357      # Going to short mode and back again did indeed matter. Since short mode is
18358      # case insensitive, let's make it lowercase to improve readability.
18359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18360      # Now convert it back to Unix-style (cygpath)
18361      input_path=`$CYGPATH -u "$shortmode_path"`
18362      new_path="$input_path"
18363    fi
18364  fi
18365
18366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18367  if test "x$test_cygdrive_prefix" = x; then
18368    # As a simple fix, exclude /usr/bin since it's not a real path.
18369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18371      # a path prefixed by /cygdrive for fixpath to work.
18372      new_path="$CYGWIN_ROOT_PATH$input_path"
18373    fi
18374  fi
18375
18376  # remove trailing .exe if any
18377  new_path="${new_path/%.exe/}"
18378
18379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18380
18381  # First separate the path from the arguments. This will split at the first
18382  # space.
18383  complete="$FOUND_MAKE"
18384  path="${complete%% *}"
18385  tmp="$complete EOL"
18386  arguments="${tmp#* }"
18387
18388  # Input might be given as Windows format, start by converting to
18389  # unix format.
18390  new_path="$path"
18391
18392  windows_path="$new_path"
18393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18394    unix_path=`$CYGPATH -u "$windows_path"`
18395    new_path="$unix_path"
18396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18398    new_path="$unix_path"
18399  fi
18400
18401
18402  # Now try to locate executable using which
18403  new_path=`$WHICH "$new_path" 2> /dev/null`
18404
18405  if test "x$new_path" = x; then
18406    # Oops. Which didn't find the executable.
18407    # The splitting of arguments from the executable at a space might have been incorrect,
18408    # since paths with space are more likely in Windows. Give it another try with the whole
18409    # argument.
18410    path="$complete"
18411    arguments="EOL"
18412    new_path="$path"
18413
18414  windows_path="$new_path"
18415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18416    unix_path=`$CYGPATH -u "$windows_path"`
18417    new_path="$unix_path"
18418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18420    new_path="$unix_path"
18421  fi
18422
18423
18424    new_path=`$WHICH "$new_path" 2> /dev/null`
18425    # bat and cmd files are not always considered executable in MSYS causing which
18426    # to not find them
18427    if test "x$new_path" = x \
18428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18430      new_path="$path"
18431
18432  windows_path="$new_path"
18433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18434    unix_path=`$CYGPATH -u "$windows_path"`
18435    new_path="$unix_path"
18436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18438    new_path="$unix_path"
18439  fi
18440
18441    fi
18442
18443    if test "x$new_path" = x; then
18444      # It's still not found. Now this is an unrecoverable error.
18445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18447      has_space=`$ECHO "$complete" | $GREP " "`
18448      if test "x$has_space" != x; then
18449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18451      fi
18452      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18453    fi
18454  fi
18455
18456  # Now new_path has a complete unix path to the binary
18457  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18458    # Keep paths in /bin as-is, but remove trailing .exe if any
18459    new_path="${new_path/%.exe/}"
18460    # Do not save /bin paths to all_fixpath_prefixes!
18461  else
18462    # Not in mixed or Windows style, start by that.
18463    new_path=`cmd //c echo $new_path`
18464
18465  input_path="$new_path"
18466  # Check if we need to convert this using DOS-style short mode. If the path
18467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18468  # take no chances and rewrite it.
18469  # Note: m4 eats our [], so we need to use [ and ] instead.
18470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18471  if test "x$has_forbidden_chars" != x; then
18472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18474  fi
18475
18476    # Output is in $new_path
18477
18478  windows_path="$new_path"
18479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18480    unix_path=`$CYGPATH -u "$windows_path"`
18481    new_path="$unix_path"
18482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18484    new_path="$unix_path"
18485  fi
18486
18487    # remove trailing .exe if any
18488    new_path="${new_path/%.exe/}"
18489
18490    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18491    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18492  fi
18493
18494    else
18495      # We're on a unix platform. Hooray! :)
18496      # First separate the path from the arguments. This will split at the first
18497      # space.
18498      complete="$FOUND_MAKE"
18499      path="${complete%% *}"
18500      tmp="$complete EOL"
18501      arguments="${tmp#* }"
18502
18503      # Cannot rely on the command "which" here since it doesn't always work.
18504      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18505      if test -z "$is_absolute_path"; then
18506        # Path to executable is not absolute. Find it.
18507        IFS_save="$IFS"
18508        IFS=:
18509        for p in $PATH; do
18510          if test -f "$p/$path" && test -x "$p/$path"; then
18511            new_path="$p/$path"
18512            break
18513          fi
18514        done
18515        IFS="$IFS_save"
18516      else
18517        # This is an absolute path, we can use it without further modifications.
18518        new_path="$path"
18519      fi
18520
18521      if test "x$new_path" = x; then
18522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18523$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18524        has_space=`$ECHO "$complete" | $GREP " "`
18525        if test "x$has_space" != x; then
18526          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18528        fi
18529        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18530      fi
18531    fi
18532
18533    # Now join together the path and the arguments once again
18534    if test "x$arguments" != xEOL; then
18535      new_complete="$new_path ${arguments% *}"
18536    else
18537      new_complete="$new_path"
18538    fi
18539
18540    if test "x$complete" != "x$new_complete"; then
18541      FOUND_MAKE="$new_complete"
18542      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18543$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18544    fi
18545  fi
18546
18547        fi
18548      fi
18549    fi
18550  fi
18551
18552    fi
18553
18554    if test "x$FOUND_MAKE" = x; then
18555      if test "x$TOOLCHAIN_PATH" != x; then
18556        # We have a toolchain path, check that as well before giving up.
18557        OLD_PATH=$PATH
18558        PATH=$TOOLCHAIN_PATH:$PATH
18559        for ac_prog in gmake
18560do
18561  # Extract the first word of "$ac_prog", so it can be a program name with args.
18562set dummy $ac_prog; ac_word=$2
18563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18564$as_echo_n "checking for $ac_word... " >&6; }
18565if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18566  $as_echo_n "(cached) " >&6
18567else
18568  case $CHECK_TOOLSDIR_GMAKE in
18569  [\\/]* | ?:[\\/]*)
18570  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18571  ;;
18572  *)
18573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18574for as_dir in $PATH
18575do
18576  IFS=$as_save_IFS
18577  test -z "$as_dir" && as_dir=.
18578    for ac_exec_ext in '' $ac_executable_extensions; do
18579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18580    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18582    break 2
18583  fi
18584done
18585  done
18586IFS=$as_save_IFS
18587
18588  ;;
18589esac
18590fi
18591CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18592if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18594$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18595else
18596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18597$as_echo "no" >&6; }
18598fi
18599
18600
18601  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18602done
18603
18604
18605  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18606  DESCRIPTION="gmake in tools-dir"
18607
18608  # On Cygwin, we require a newer version of make than on other platforms
18609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18610    MAKE_VERSION_EXPR="-e 4\."
18611    MAKE_REQUIRED_VERSION="4.0"
18612   else
18613    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18614    MAKE_REQUIRED_VERSION="3.81"
18615  fi
18616
18617  if test "x$MAKE_CANDIDATE" != x; then
18618    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18619$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18620    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18621    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18622    if test "x$IS_GNU_MAKE" = x; then
18623      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18624$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18625    else
18626      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18627      if test "x$IS_MODERN_MAKE" = x; then
18628        { $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
18629$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;}
18630      else
18631        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18632          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18633            MAKE_EXPECTED_ENV='cygwin'
18634          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18635            MAKE_EXPECTED_ENV='msys'
18636          else
18637            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18638          fi
18639          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18640          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18641        else
18642          # Not relevant for non-Windows
18643          IS_MAKE_CORRECT_ENV=true
18644        fi
18645        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18646          { $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
18647$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;}
18648        else
18649          FOUND_MAKE=$MAKE_CANDIDATE
18650
18651  # Only process if variable expands to non-empty
18652
18653  if test "x$FOUND_MAKE" != x; then
18654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18655
18656  # First separate the path from the arguments. This will split at the first
18657  # space.
18658  complete="$FOUND_MAKE"
18659  path="${complete%% *}"
18660  tmp="$complete EOL"
18661  arguments="${tmp#* }"
18662
18663  # Input might be given as Windows format, start by converting to
18664  # unix format.
18665  new_path=`$CYGPATH -u "$path"`
18666
18667  # Now try to locate executable using which
18668  new_path=`$WHICH "$new_path" 2> /dev/null`
18669  # bat and cmd files are not always considered executable in cygwin causing which
18670  # to not find them
18671  if test "x$new_path" = x \
18672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18674    new_path=`$CYGPATH -u "$path"`
18675  fi
18676  if test "x$new_path" = x; then
18677    # Oops. Which didn't find the executable.
18678    # The splitting of arguments from the executable at a space might have been incorrect,
18679    # since paths with space are more likely in Windows. Give it another try with the whole
18680    # argument.
18681    path="$complete"
18682    arguments="EOL"
18683    new_path=`$CYGPATH -u "$path"`
18684    new_path=`$WHICH "$new_path" 2> /dev/null`
18685    # bat and cmd files are not always considered executable in cygwin causing which
18686    # to not find them
18687    if test "x$new_path" = x \
18688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18690      new_path=`$CYGPATH -u "$path"`
18691    fi
18692    if test "x$new_path" = x; then
18693      # It's still not found. Now this is an unrecoverable error.
18694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18696      has_space=`$ECHO "$complete" | $GREP " "`
18697      if test "x$has_space" != x; then
18698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18700      fi
18701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18702    fi
18703  fi
18704
18705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18708  # "foo.exe" is OK but "foo" is an error.
18709  #
18710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18711  # It is also a way to make sure we got the proper file name for the real test later on.
18712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18713  if test "x$test_shortpath" = x; then
18714    # Short path failed, file does not exist as specified.
18715    # Try adding .exe or .cmd
18716    if test -f "${new_path}.exe"; then
18717      input_to_shortpath="${new_path}.exe"
18718    elif test -f "${new_path}.cmd"; then
18719      input_to_shortpath="${new_path}.cmd"
18720    else
18721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18726    fi
18727  else
18728    input_to_shortpath="$new_path"
18729  fi
18730
18731  # Call helper function which possibly converts this using DOS-style short mode.
18732  # If so, the updated path is stored in $new_path.
18733  new_path="$input_to_shortpath"
18734
18735  input_path="$input_to_shortpath"
18736  # Check if we need to convert this using DOS-style short mode. If the path
18737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18738  # take no chances and rewrite it.
18739  # Note: m4 eats our [], so we need to use [ and ] instead.
18740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18741  if test "x$has_forbidden_chars" != x; then
18742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18746      # Going to short mode and back again did indeed matter. Since short mode is
18747      # case insensitive, let's make it lowercase to improve readability.
18748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18749      # Now convert it back to Unix-style (cygpath)
18750      input_path=`$CYGPATH -u "$shortmode_path"`
18751      new_path="$input_path"
18752    fi
18753  fi
18754
18755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18756  if test "x$test_cygdrive_prefix" = x; then
18757    # As a simple fix, exclude /usr/bin since it's not a real path.
18758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18760      # a path prefixed by /cygdrive for fixpath to work.
18761      new_path="$CYGWIN_ROOT_PATH$input_path"
18762    fi
18763  fi
18764
18765  # remove trailing .exe if any
18766  new_path="${new_path/%.exe/}"
18767
18768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18769
18770  # First separate the path from the arguments. This will split at the first
18771  # space.
18772  complete="$FOUND_MAKE"
18773  path="${complete%% *}"
18774  tmp="$complete EOL"
18775  arguments="${tmp#* }"
18776
18777  # Input might be given as Windows format, start by converting to
18778  # unix format.
18779  new_path="$path"
18780
18781  windows_path="$new_path"
18782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783    unix_path=`$CYGPATH -u "$windows_path"`
18784    new_path="$unix_path"
18785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18787    new_path="$unix_path"
18788  fi
18789
18790
18791  # Now try to locate executable using which
18792  new_path=`$WHICH "$new_path" 2> /dev/null`
18793
18794  if test "x$new_path" = x; then
18795    # Oops. Which didn't find the executable.
18796    # The splitting of arguments from the executable at a space might have been incorrect,
18797    # since paths with space are more likely in Windows. Give it another try with the whole
18798    # argument.
18799    path="$complete"
18800    arguments="EOL"
18801    new_path="$path"
18802
18803  windows_path="$new_path"
18804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18805    unix_path=`$CYGPATH -u "$windows_path"`
18806    new_path="$unix_path"
18807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18809    new_path="$unix_path"
18810  fi
18811
18812
18813    new_path=`$WHICH "$new_path" 2> /dev/null`
18814    # bat and cmd files are not always considered executable in MSYS causing which
18815    # to not find them
18816    if test "x$new_path" = x \
18817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18819      new_path="$path"
18820
18821  windows_path="$new_path"
18822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18823    unix_path=`$CYGPATH -u "$windows_path"`
18824    new_path="$unix_path"
18825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18827    new_path="$unix_path"
18828  fi
18829
18830    fi
18831
18832    if test "x$new_path" = x; then
18833      # It's still not found. Now this is an unrecoverable error.
18834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18835$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18836      has_space=`$ECHO "$complete" | $GREP " "`
18837      if test "x$has_space" != x; then
18838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18840      fi
18841      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18842    fi
18843  fi
18844
18845  # Now new_path has a complete unix path to the binary
18846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18847    # Keep paths in /bin as-is, but remove trailing .exe if any
18848    new_path="${new_path/%.exe/}"
18849    # Do not save /bin paths to all_fixpath_prefixes!
18850  else
18851    # Not in mixed or Windows style, start by that.
18852    new_path=`cmd //c echo $new_path`
18853
18854  input_path="$new_path"
18855  # Check if we need to convert this using DOS-style short mode. If the path
18856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18857  # take no chances and rewrite it.
18858  # Note: m4 eats our [], so we need to use [ and ] instead.
18859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18860  if test "x$has_forbidden_chars" != x; then
18861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18863  fi
18864
18865    # Output is in $new_path
18866
18867  windows_path="$new_path"
18868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18869    unix_path=`$CYGPATH -u "$windows_path"`
18870    new_path="$unix_path"
18871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18873    new_path="$unix_path"
18874  fi
18875
18876    # remove trailing .exe if any
18877    new_path="${new_path/%.exe/}"
18878
18879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18881  fi
18882
18883    else
18884      # We're on a unix platform. Hooray! :)
18885      # First separate the path from the arguments. This will split at the first
18886      # space.
18887      complete="$FOUND_MAKE"
18888      path="${complete%% *}"
18889      tmp="$complete EOL"
18890      arguments="${tmp#* }"
18891
18892      # Cannot rely on the command "which" here since it doesn't always work.
18893      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18894      if test -z "$is_absolute_path"; then
18895        # Path to executable is not absolute. Find it.
18896        IFS_save="$IFS"
18897        IFS=:
18898        for p in $PATH; do
18899          if test -f "$p/$path" && test -x "$p/$path"; then
18900            new_path="$p/$path"
18901            break
18902          fi
18903        done
18904        IFS="$IFS_save"
18905      else
18906        # This is an absolute path, we can use it without further modifications.
18907        new_path="$path"
18908      fi
18909
18910      if test "x$new_path" = x; then
18911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18912$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18913        has_space=`$ECHO "$complete" | $GREP " "`
18914        if test "x$has_space" != x; then
18915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18917        fi
18918        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18919      fi
18920    fi
18921
18922    # Now join together the path and the arguments once again
18923    if test "x$arguments" != xEOL; then
18924      new_complete="$new_path ${arguments% *}"
18925    else
18926      new_complete="$new_path"
18927    fi
18928
18929    if test "x$complete" != "x$new_complete"; then
18930      FOUND_MAKE="$new_complete"
18931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18932$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18933    fi
18934  fi
18935
18936        fi
18937      fi
18938    fi
18939  fi
18940
18941        if test "x$FOUND_MAKE" = x; then
18942          for ac_prog in make
18943do
18944  # Extract the first word of "$ac_prog", so it can be a program name with args.
18945set dummy $ac_prog; ac_word=$2
18946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18947$as_echo_n "checking for $ac_word... " >&6; }
18948if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18949  $as_echo_n "(cached) " >&6
18950else
18951  case $CHECK_TOOLSDIR_MAKE in
18952  [\\/]* | ?:[\\/]*)
18953  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18954  ;;
18955  *)
18956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18957for as_dir in $PATH
18958do
18959  IFS=$as_save_IFS
18960  test -z "$as_dir" && as_dir=.
18961    for ac_exec_ext in '' $ac_executable_extensions; do
18962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18963    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18965    break 2
18966  fi
18967done
18968  done
18969IFS=$as_save_IFS
18970
18971  ;;
18972esac
18973fi
18974CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18975if test -n "$CHECK_TOOLSDIR_MAKE"; then
18976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18977$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18978else
18979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18980$as_echo "no" >&6; }
18981fi
18982
18983
18984  test -n "$CHECK_TOOLSDIR_MAKE" && break
18985done
18986
18987
18988  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18989  DESCRIPTION="make in tools-dir"
18990
18991  # On Cygwin, we require a newer version of make than on other platforms
18992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18993    MAKE_VERSION_EXPR="-e 4\."
18994    MAKE_REQUIRED_VERSION="4.0"
18995   else
18996    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18997    MAKE_REQUIRED_VERSION="3.81"
18998  fi
18999
19000  if test "x$MAKE_CANDIDATE" != x; then
19001    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19002$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19003    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19004    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19005    if test "x$IS_GNU_MAKE" = x; then
19006      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19007$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19008    else
19009      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19010      if test "x$IS_MODERN_MAKE" = x; then
19011        { $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
19012$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;}
19013      else
19014        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19015          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19016            MAKE_EXPECTED_ENV='cygwin'
19017          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19018            MAKE_EXPECTED_ENV='msys'
19019          else
19020            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19021          fi
19022          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19023          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19024        else
19025          # Not relevant for non-Windows
19026          IS_MAKE_CORRECT_ENV=true
19027        fi
19028        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19029          { $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
19030$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;}
19031        else
19032          FOUND_MAKE=$MAKE_CANDIDATE
19033
19034  # Only process if variable expands to non-empty
19035
19036  if test "x$FOUND_MAKE" != x; then
19037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19038
19039  # First separate the path from the arguments. This will split at the first
19040  # space.
19041  complete="$FOUND_MAKE"
19042  path="${complete%% *}"
19043  tmp="$complete EOL"
19044  arguments="${tmp#* }"
19045
19046  # Input might be given as Windows format, start by converting to
19047  # unix format.
19048  new_path=`$CYGPATH -u "$path"`
19049
19050  # Now try to locate executable using which
19051  new_path=`$WHICH "$new_path" 2> /dev/null`
19052  # bat and cmd files are not always considered executable in cygwin causing which
19053  # to not find them
19054  if test "x$new_path" = x \
19055      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19056      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19057    new_path=`$CYGPATH -u "$path"`
19058  fi
19059  if test "x$new_path" = x; then
19060    # Oops. Which didn't find the executable.
19061    # The splitting of arguments from the executable at a space might have been incorrect,
19062    # since paths with space are more likely in Windows. Give it another try with the whole
19063    # argument.
19064    path="$complete"
19065    arguments="EOL"
19066    new_path=`$CYGPATH -u "$path"`
19067    new_path=`$WHICH "$new_path" 2> /dev/null`
19068    # bat and cmd files are not always considered executable in cygwin causing which
19069    # to not find them
19070    if test "x$new_path" = x \
19071        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19072        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19073      new_path=`$CYGPATH -u "$path"`
19074    fi
19075    if test "x$new_path" = x; then
19076      # It's still not found. Now this is an unrecoverable error.
19077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19079      has_space=`$ECHO "$complete" | $GREP " "`
19080      if test "x$has_space" != x; then
19081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19083      fi
19084      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19085    fi
19086  fi
19087
19088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19091  # "foo.exe" is OK but "foo" is an error.
19092  #
19093  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19094  # It is also a way to make sure we got the proper file name for the real test later on.
19095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19096  if test "x$test_shortpath" = x; then
19097    # Short path failed, file does not exist as specified.
19098    # Try adding .exe or .cmd
19099    if test -f "${new_path}.exe"; then
19100      input_to_shortpath="${new_path}.exe"
19101    elif test -f "${new_path}.cmd"; then
19102      input_to_shortpath="${new_path}.cmd"
19103    else
19104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19105$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19106      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19107$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19108      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19109    fi
19110  else
19111    input_to_shortpath="$new_path"
19112  fi
19113
19114  # Call helper function which possibly converts this using DOS-style short mode.
19115  # If so, the updated path is stored in $new_path.
19116  new_path="$input_to_shortpath"
19117
19118  input_path="$input_to_shortpath"
19119  # Check if we need to convert this using DOS-style short mode. If the path
19120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19121  # take no chances and rewrite it.
19122  # Note: m4 eats our [], so we need to use [ and ] instead.
19123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19124  if test "x$has_forbidden_chars" != x; then
19125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19129      # Going to short mode and back again did indeed matter. Since short mode is
19130      # case insensitive, let's make it lowercase to improve readability.
19131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19132      # Now convert it back to Unix-style (cygpath)
19133      input_path=`$CYGPATH -u "$shortmode_path"`
19134      new_path="$input_path"
19135    fi
19136  fi
19137
19138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19139  if test "x$test_cygdrive_prefix" = x; then
19140    # As a simple fix, exclude /usr/bin since it's not a real path.
19141    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19143      # a path prefixed by /cygdrive for fixpath to work.
19144      new_path="$CYGWIN_ROOT_PATH$input_path"
19145    fi
19146  fi
19147
19148  # remove trailing .exe if any
19149  new_path="${new_path/%.exe/}"
19150
19151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19152
19153  # First separate the path from the arguments. This will split at the first
19154  # space.
19155  complete="$FOUND_MAKE"
19156  path="${complete%% *}"
19157  tmp="$complete EOL"
19158  arguments="${tmp#* }"
19159
19160  # Input might be given as Windows format, start by converting to
19161  # unix format.
19162  new_path="$path"
19163
19164  windows_path="$new_path"
19165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19166    unix_path=`$CYGPATH -u "$windows_path"`
19167    new_path="$unix_path"
19168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19170    new_path="$unix_path"
19171  fi
19172
19173
19174  # Now try to locate executable using which
19175  new_path=`$WHICH "$new_path" 2> /dev/null`
19176
19177  if test "x$new_path" = x; then
19178    # Oops. Which didn't find the executable.
19179    # The splitting of arguments from the executable at a space might have been incorrect,
19180    # since paths with space are more likely in Windows. Give it another try with the whole
19181    # argument.
19182    path="$complete"
19183    arguments="EOL"
19184    new_path="$path"
19185
19186  windows_path="$new_path"
19187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19188    unix_path=`$CYGPATH -u "$windows_path"`
19189    new_path="$unix_path"
19190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19192    new_path="$unix_path"
19193  fi
19194
19195
19196    new_path=`$WHICH "$new_path" 2> /dev/null`
19197    # bat and cmd files are not always considered executable in MSYS causing which
19198    # to not find them
19199    if test "x$new_path" = x \
19200        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19201        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19202      new_path="$path"
19203
19204  windows_path="$new_path"
19205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19206    unix_path=`$CYGPATH -u "$windows_path"`
19207    new_path="$unix_path"
19208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19210    new_path="$unix_path"
19211  fi
19212
19213    fi
19214
19215    if test "x$new_path" = x; then
19216      # It's still not found. Now this is an unrecoverable error.
19217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19219      has_space=`$ECHO "$complete" | $GREP " "`
19220      if test "x$has_space" != x; then
19221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19223      fi
19224      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19225    fi
19226  fi
19227
19228  # Now new_path has a complete unix path to the binary
19229  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19230    # Keep paths in /bin as-is, but remove trailing .exe if any
19231    new_path="${new_path/%.exe/}"
19232    # Do not save /bin paths to all_fixpath_prefixes!
19233  else
19234    # Not in mixed or Windows style, start by that.
19235    new_path=`cmd //c echo $new_path`
19236
19237  input_path="$new_path"
19238  # Check if we need to convert this using DOS-style short mode. If the path
19239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19240  # take no chances and rewrite it.
19241  # Note: m4 eats our [], so we need to use [ and ] instead.
19242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19243  if test "x$has_forbidden_chars" != x; then
19244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19246  fi
19247
19248    # Output is in $new_path
19249
19250  windows_path="$new_path"
19251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19252    unix_path=`$CYGPATH -u "$windows_path"`
19253    new_path="$unix_path"
19254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19256    new_path="$unix_path"
19257  fi
19258
19259    # remove trailing .exe if any
19260    new_path="${new_path/%.exe/}"
19261
19262    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19263    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19264  fi
19265
19266    else
19267      # We're on a unix platform. Hooray! :)
19268      # First separate the path from the arguments. This will split at the first
19269      # space.
19270      complete="$FOUND_MAKE"
19271      path="${complete%% *}"
19272      tmp="$complete EOL"
19273      arguments="${tmp#* }"
19274
19275      # Cannot rely on the command "which" here since it doesn't always work.
19276      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19277      if test -z "$is_absolute_path"; then
19278        # Path to executable is not absolute. Find it.
19279        IFS_save="$IFS"
19280        IFS=:
19281        for p in $PATH; do
19282          if test -f "$p/$path" && test -x "$p/$path"; then
19283            new_path="$p/$path"
19284            break
19285          fi
19286        done
19287        IFS="$IFS_save"
19288      else
19289        # This is an absolute path, we can use it without further modifications.
19290        new_path="$path"
19291      fi
19292
19293      if test "x$new_path" = x; then
19294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19296        has_space=`$ECHO "$complete" | $GREP " "`
19297        if test "x$has_space" != x; then
19298          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19299$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19300        fi
19301        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19302      fi
19303    fi
19304
19305    # Now join together the path and the arguments once again
19306    if test "x$arguments" != xEOL; then
19307      new_complete="$new_path ${arguments% *}"
19308    else
19309      new_complete="$new_path"
19310    fi
19311
19312    if test "x$complete" != "x$new_complete"; then
19313      FOUND_MAKE="$new_complete"
19314      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19315$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19316    fi
19317  fi
19318
19319        fi
19320      fi
19321    fi
19322  fi
19323
19324        fi
19325        PATH=$OLD_PATH
19326      fi
19327    fi
19328
19329    if test "x$FOUND_MAKE" = x; then
19330      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
19331    fi
19332
19333  else
19334    # The variable is set, but is it from the command line or the environment?
19335
19336    # Try to remove the string !MAKE! from our list.
19337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19339      # If it failed, the variable was not from the command line. Ignore it,
19340      # but warn the user (except for BASH, which is always set by the calling BASH).
19341      if test "xMAKE" != xBASH; then
19342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19343$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19344      fi
19345      # Try to locate tool using the code snippet
19346
19347    # Try our hardest to locate a correct version of GNU make
19348    for ac_prog in gmake
19349do
19350  # Extract the first word of "$ac_prog", so it can be a program name with args.
19351set dummy $ac_prog; ac_word=$2
19352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19353$as_echo_n "checking for $ac_word... " >&6; }
19354if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19355  $as_echo_n "(cached) " >&6
19356else
19357  case $CHECK_GMAKE in
19358  [\\/]* | ?:[\\/]*)
19359  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19360  ;;
19361  *)
19362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19363for as_dir in $PATH
19364do
19365  IFS=$as_save_IFS
19366  test -z "$as_dir" && as_dir=.
19367    for ac_exec_ext in '' $ac_executable_extensions; do
19368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19369    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19371    break 2
19372  fi
19373done
19374  done
19375IFS=$as_save_IFS
19376
19377  ;;
19378esac
19379fi
19380CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19381if test -n "$CHECK_GMAKE"; then
19382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19383$as_echo "$CHECK_GMAKE" >&6; }
19384else
19385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19386$as_echo "no" >&6; }
19387fi
19388
19389
19390  test -n "$CHECK_GMAKE" && break
19391done
19392
19393
19394  MAKE_CANDIDATE=""$CHECK_GMAKE""
19395  DESCRIPTION="gmake in PATH"
19396
19397  # On Cygwin, we require a newer version of make than on other platforms
19398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19399    MAKE_VERSION_EXPR="-e 4\."
19400    MAKE_REQUIRED_VERSION="4.0"
19401   else
19402    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19403    MAKE_REQUIRED_VERSION="3.81"
19404  fi
19405
19406  if test "x$MAKE_CANDIDATE" != x; then
19407    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19408$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19409    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19410    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19411    if test "x$IS_GNU_MAKE" = x; then
19412      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19413$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19414    else
19415      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19416      if test "x$IS_MODERN_MAKE" = x; then
19417        { $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
19418$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;}
19419      else
19420        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19421          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19422            MAKE_EXPECTED_ENV='cygwin'
19423          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19424            MAKE_EXPECTED_ENV='msys'
19425          else
19426            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19427          fi
19428          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19429          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19430        else
19431          # Not relevant for non-Windows
19432          IS_MAKE_CORRECT_ENV=true
19433        fi
19434        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19435          { $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
19436$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;}
19437        else
19438          FOUND_MAKE=$MAKE_CANDIDATE
19439
19440  # Only process if variable expands to non-empty
19441
19442  if test "x$FOUND_MAKE" != x; then
19443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19444
19445  # First separate the path from the arguments. This will split at the first
19446  # space.
19447  complete="$FOUND_MAKE"
19448  path="${complete%% *}"
19449  tmp="$complete EOL"
19450  arguments="${tmp#* }"
19451
19452  # Input might be given as Windows format, start by converting to
19453  # unix format.
19454  new_path=`$CYGPATH -u "$path"`
19455
19456  # Now try to locate executable using which
19457  new_path=`$WHICH "$new_path" 2> /dev/null`
19458  # bat and cmd files are not always considered executable in cygwin causing which
19459  # to not find them
19460  if test "x$new_path" = x \
19461      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19462      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19463    new_path=`$CYGPATH -u "$path"`
19464  fi
19465  if test "x$new_path" = x; then
19466    # Oops. Which didn't find the executable.
19467    # The splitting of arguments from the executable at a space might have been incorrect,
19468    # since paths with space are more likely in Windows. Give it another try with the whole
19469    # argument.
19470    path="$complete"
19471    arguments="EOL"
19472    new_path=`$CYGPATH -u "$path"`
19473    new_path=`$WHICH "$new_path" 2> /dev/null`
19474    # bat and cmd files are not always considered executable in cygwin causing which
19475    # to not find them
19476    if test "x$new_path" = x \
19477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19479      new_path=`$CYGPATH -u "$path"`
19480    fi
19481    if test "x$new_path" = x; then
19482      # It's still not found. Now this is an unrecoverable error.
19483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19484$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19485      has_space=`$ECHO "$complete" | $GREP " "`
19486      if test "x$has_space" != x; then
19487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19489      fi
19490      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19491    fi
19492  fi
19493
19494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19497  # "foo.exe" is OK but "foo" is an error.
19498  #
19499  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19500  # It is also a way to make sure we got the proper file name for the real test later on.
19501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19502  if test "x$test_shortpath" = x; then
19503    # Short path failed, file does not exist as specified.
19504    # Try adding .exe or .cmd
19505    if test -f "${new_path}.exe"; then
19506      input_to_shortpath="${new_path}.exe"
19507    elif test -f "${new_path}.cmd"; then
19508      input_to_shortpath="${new_path}.cmd"
19509    else
19510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19511$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19512      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19513$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19515    fi
19516  else
19517    input_to_shortpath="$new_path"
19518  fi
19519
19520  # Call helper function which possibly converts this using DOS-style short mode.
19521  # If so, the updated path is stored in $new_path.
19522  new_path="$input_to_shortpath"
19523
19524  input_path="$input_to_shortpath"
19525  # Check if we need to convert this using DOS-style short mode. If the path
19526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19527  # take no chances and rewrite it.
19528  # Note: m4 eats our [], so we need to use [ and ] instead.
19529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19530  if test "x$has_forbidden_chars" != x; then
19531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19535      # Going to short mode and back again did indeed matter. Since short mode is
19536      # case insensitive, let's make it lowercase to improve readability.
19537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19538      # Now convert it back to Unix-style (cygpath)
19539      input_path=`$CYGPATH -u "$shortmode_path"`
19540      new_path="$input_path"
19541    fi
19542  fi
19543
19544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19545  if test "x$test_cygdrive_prefix" = x; then
19546    # As a simple fix, exclude /usr/bin since it's not a real path.
19547    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19549      # a path prefixed by /cygdrive for fixpath to work.
19550      new_path="$CYGWIN_ROOT_PATH$input_path"
19551    fi
19552  fi
19553
19554  # remove trailing .exe if any
19555  new_path="${new_path/%.exe/}"
19556
19557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19558
19559  # First separate the path from the arguments. This will split at the first
19560  # space.
19561  complete="$FOUND_MAKE"
19562  path="${complete%% *}"
19563  tmp="$complete EOL"
19564  arguments="${tmp#* }"
19565
19566  # Input might be given as Windows format, start by converting to
19567  # unix format.
19568  new_path="$path"
19569
19570  windows_path="$new_path"
19571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19572    unix_path=`$CYGPATH -u "$windows_path"`
19573    new_path="$unix_path"
19574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19576    new_path="$unix_path"
19577  fi
19578
19579
19580  # Now try to locate executable using which
19581  new_path=`$WHICH "$new_path" 2> /dev/null`
19582
19583  if test "x$new_path" = x; then
19584    # Oops. Which didn't find the executable.
19585    # The splitting of arguments from the executable at a space might have been incorrect,
19586    # since paths with space are more likely in Windows. Give it another try with the whole
19587    # argument.
19588    path="$complete"
19589    arguments="EOL"
19590    new_path="$path"
19591
19592  windows_path="$new_path"
19593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19594    unix_path=`$CYGPATH -u "$windows_path"`
19595    new_path="$unix_path"
19596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19598    new_path="$unix_path"
19599  fi
19600
19601
19602    new_path=`$WHICH "$new_path" 2> /dev/null`
19603    # bat and cmd files are not always considered executable in MSYS causing which
19604    # to not find them
19605    if test "x$new_path" = x \
19606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19608      new_path="$path"
19609
19610  windows_path="$new_path"
19611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19612    unix_path=`$CYGPATH -u "$windows_path"`
19613    new_path="$unix_path"
19614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19616    new_path="$unix_path"
19617  fi
19618
19619    fi
19620
19621    if test "x$new_path" = x; then
19622      # It's still not found. Now this is an unrecoverable error.
19623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19624$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19625      has_space=`$ECHO "$complete" | $GREP " "`
19626      if test "x$has_space" != x; then
19627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19629      fi
19630      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19631    fi
19632  fi
19633
19634  # Now new_path has a complete unix path to the binary
19635  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19636    # Keep paths in /bin as-is, but remove trailing .exe if any
19637    new_path="${new_path/%.exe/}"
19638    # Do not save /bin paths to all_fixpath_prefixes!
19639  else
19640    # Not in mixed or Windows style, start by that.
19641    new_path=`cmd //c echo $new_path`
19642
19643  input_path="$new_path"
19644  # Check if we need to convert this using DOS-style short mode. If the path
19645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19646  # take no chances and rewrite it.
19647  # Note: m4 eats our [], so we need to use [ and ] instead.
19648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19649  if test "x$has_forbidden_chars" != x; then
19650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19652  fi
19653
19654    # Output is in $new_path
19655
19656  windows_path="$new_path"
19657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19658    unix_path=`$CYGPATH -u "$windows_path"`
19659    new_path="$unix_path"
19660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19662    new_path="$unix_path"
19663  fi
19664
19665    # remove trailing .exe if any
19666    new_path="${new_path/%.exe/}"
19667
19668    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19669    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19670  fi
19671
19672    else
19673      # We're on a unix platform. Hooray! :)
19674      # First separate the path from the arguments. This will split at the first
19675      # space.
19676      complete="$FOUND_MAKE"
19677      path="${complete%% *}"
19678      tmp="$complete EOL"
19679      arguments="${tmp#* }"
19680
19681      # Cannot rely on the command "which" here since it doesn't always work.
19682      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19683      if test -z "$is_absolute_path"; then
19684        # Path to executable is not absolute. Find it.
19685        IFS_save="$IFS"
19686        IFS=:
19687        for p in $PATH; do
19688          if test -f "$p/$path" && test -x "$p/$path"; then
19689            new_path="$p/$path"
19690            break
19691          fi
19692        done
19693        IFS="$IFS_save"
19694      else
19695        # This is an absolute path, we can use it without further modifications.
19696        new_path="$path"
19697      fi
19698
19699      if test "x$new_path" = x; then
19700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19702        has_space=`$ECHO "$complete" | $GREP " "`
19703        if test "x$has_space" != x; then
19704          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19705$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19706        fi
19707        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19708      fi
19709    fi
19710
19711    # Now join together the path and the arguments once again
19712    if test "x$arguments" != xEOL; then
19713      new_complete="$new_path ${arguments% *}"
19714    else
19715      new_complete="$new_path"
19716    fi
19717
19718    if test "x$complete" != "x$new_complete"; then
19719      FOUND_MAKE="$new_complete"
19720      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19721$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19722    fi
19723  fi
19724
19725        fi
19726      fi
19727    fi
19728  fi
19729
19730
19731    if test "x$FOUND_MAKE" = x; then
19732      for ac_prog in make
19733do
19734  # Extract the first word of "$ac_prog", so it can be a program name with args.
19735set dummy $ac_prog; ac_word=$2
19736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19737$as_echo_n "checking for $ac_word... " >&6; }
19738if ${ac_cv_path_CHECK_MAKE+:} false; then :
19739  $as_echo_n "(cached) " >&6
19740else
19741  case $CHECK_MAKE in
19742  [\\/]* | ?:[\\/]*)
19743  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19744  ;;
19745  *)
19746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19747for as_dir in $PATH
19748do
19749  IFS=$as_save_IFS
19750  test -z "$as_dir" && as_dir=.
19751    for ac_exec_ext in '' $ac_executable_extensions; do
19752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19753    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19755    break 2
19756  fi
19757done
19758  done
19759IFS=$as_save_IFS
19760
19761  ;;
19762esac
19763fi
19764CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19765if test -n "$CHECK_MAKE"; then
19766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19767$as_echo "$CHECK_MAKE" >&6; }
19768else
19769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19770$as_echo "no" >&6; }
19771fi
19772
19773
19774  test -n "$CHECK_MAKE" && break
19775done
19776
19777
19778  MAKE_CANDIDATE=""$CHECK_MAKE""
19779  DESCRIPTION="make in PATH"
19780
19781  # On Cygwin, we require a newer version of make than on other platforms
19782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19783    MAKE_VERSION_EXPR="-e 4\."
19784    MAKE_REQUIRED_VERSION="4.0"
19785   else
19786    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19787    MAKE_REQUIRED_VERSION="3.81"
19788  fi
19789
19790  if test "x$MAKE_CANDIDATE" != x; then
19791    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19792$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19793    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19794    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19795    if test "x$IS_GNU_MAKE" = x; then
19796      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19797$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19798    else
19799      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19800      if test "x$IS_MODERN_MAKE" = x; then
19801        { $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
19802$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;}
19803      else
19804        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19805          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19806            MAKE_EXPECTED_ENV='cygwin'
19807          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19808            MAKE_EXPECTED_ENV='msys'
19809          else
19810            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19811          fi
19812          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19813          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19814        else
19815          # Not relevant for non-Windows
19816          IS_MAKE_CORRECT_ENV=true
19817        fi
19818        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19819          { $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
19820$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;}
19821        else
19822          FOUND_MAKE=$MAKE_CANDIDATE
19823
19824  # Only process if variable expands to non-empty
19825
19826  if test "x$FOUND_MAKE" != x; then
19827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19828
19829  # First separate the path from the arguments. This will split at the first
19830  # space.
19831  complete="$FOUND_MAKE"
19832  path="${complete%% *}"
19833  tmp="$complete EOL"
19834  arguments="${tmp#* }"
19835
19836  # Input might be given as Windows format, start by converting to
19837  # unix format.
19838  new_path=`$CYGPATH -u "$path"`
19839
19840  # Now try to locate executable using which
19841  new_path=`$WHICH "$new_path" 2> /dev/null`
19842  # bat and cmd files are not always considered executable in cygwin causing which
19843  # to not find them
19844  if test "x$new_path" = x \
19845      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19846      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19847    new_path=`$CYGPATH -u "$path"`
19848  fi
19849  if test "x$new_path" = x; then
19850    # Oops. Which didn't find the executable.
19851    # The splitting of arguments from the executable at a space might have been incorrect,
19852    # since paths with space are more likely in Windows. Give it another try with the whole
19853    # argument.
19854    path="$complete"
19855    arguments="EOL"
19856    new_path=`$CYGPATH -u "$path"`
19857    new_path=`$WHICH "$new_path" 2> /dev/null`
19858    # bat and cmd files are not always considered executable in cygwin causing which
19859    # to not find them
19860    if test "x$new_path" = x \
19861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19863      new_path=`$CYGPATH -u "$path"`
19864    fi
19865    if test "x$new_path" = x; then
19866      # It's still not found. Now this is an unrecoverable error.
19867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19868$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19869      has_space=`$ECHO "$complete" | $GREP " "`
19870      if test "x$has_space" != x; then
19871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19873      fi
19874      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19875    fi
19876  fi
19877
19878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19881  # "foo.exe" is OK but "foo" is an error.
19882  #
19883  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19884  # It is also a way to make sure we got the proper file name for the real test later on.
19885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19886  if test "x$test_shortpath" = x; then
19887    # Short path failed, file does not exist as specified.
19888    # Try adding .exe or .cmd
19889    if test -f "${new_path}.exe"; then
19890      input_to_shortpath="${new_path}.exe"
19891    elif test -f "${new_path}.cmd"; then
19892      input_to_shortpath="${new_path}.cmd"
19893    else
19894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19895$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19898      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19899    fi
19900  else
19901    input_to_shortpath="$new_path"
19902  fi
19903
19904  # Call helper function which possibly converts this using DOS-style short mode.
19905  # If so, the updated path is stored in $new_path.
19906  new_path="$input_to_shortpath"
19907
19908  input_path="$input_to_shortpath"
19909  # Check if we need to convert this using DOS-style short mode. If the path
19910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19911  # take no chances and rewrite it.
19912  # Note: m4 eats our [], so we need to use [ and ] instead.
19913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19914  if test "x$has_forbidden_chars" != x; then
19915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19919      # Going to short mode and back again did indeed matter. Since short mode is
19920      # case insensitive, let's make it lowercase to improve readability.
19921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19922      # Now convert it back to Unix-style (cygpath)
19923      input_path=`$CYGPATH -u "$shortmode_path"`
19924      new_path="$input_path"
19925    fi
19926  fi
19927
19928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19929  if test "x$test_cygdrive_prefix" = x; then
19930    # As a simple fix, exclude /usr/bin since it's not a real path.
19931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19933      # a path prefixed by /cygdrive for fixpath to work.
19934      new_path="$CYGWIN_ROOT_PATH$input_path"
19935    fi
19936  fi
19937
19938  # remove trailing .exe if any
19939  new_path="${new_path/%.exe/}"
19940
19941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19942
19943  # First separate the path from the arguments. This will split at the first
19944  # space.
19945  complete="$FOUND_MAKE"
19946  path="${complete%% *}"
19947  tmp="$complete EOL"
19948  arguments="${tmp#* }"
19949
19950  # Input might be given as Windows format, start by converting to
19951  # unix format.
19952  new_path="$path"
19953
19954  windows_path="$new_path"
19955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19956    unix_path=`$CYGPATH -u "$windows_path"`
19957    new_path="$unix_path"
19958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19960    new_path="$unix_path"
19961  fi
19962
19963
19964  # Now try to locate executable using which
19965  new_path=`$WHICH "$new_path" 2> /dev/null`
19966
19967  if test "x$new_path" = x; then
19968    # Oops. Which didn't find the executable.
19969    # The splitting of arguments from the executable at a space might have been incorrect,
19970    # since paths with space are more likely in Windows. Give it another try with the whole
19971    # argument.
19972    path="$complete"
19973    arguments="EOL"
19974    new_path="$path"
19975
19976  windows_path="$new_path"
19977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19978    unix_path=`$CYGPATH -u "$windows_path"`
19979    new_path="$unix_path"
19980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19982    new_path="$unix_path"
19983  fi
19984
19985
19986    new_path=`$WHICH "$new_path" 2> /dev/null`
19987    # bat and cmd files are not always considered executable in MSYS causing which
19988    # to not find them
19989    if test "x$new_path" = x \
19990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19992      new_path="$path"
19993
19994  windows_path="$new_path"
19995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19996    unix_path=`$CYGPATH -u "$windows_path"`
19997    new_path="$unix_path"
19998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20000    new_path="$unix_path"
20001  fi
20002
20003    fi
20004
20005    if test "x$new_path" = x; then
20006      # It's still not found. Now this is an unrecoverable error.
20007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20008$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20009      has_space=`$ECHO "$complete" | $GREP " "`
20010      if test "x$has_space" != x; then
20011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20013      fi
20014      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20015    fi
20016  fi
20017
20018  # Now new_path has a complete unix path to the binary
20019  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20020    # Keep paths in /bin as-is, but remove trailing .exe if any
20021    new_path="${new_path/%.exe/}"
20022    # Do not save /bin paths to all_fixpath_prefixes!
20023  else
20024    # Not in mixed or Windows style, start by that.
20025    new_path=`cmd //c echo $new_path`
20026
20027  input_path="$new_path"
20028  # Check if we need to convert this using DOS-style short mode. If the path
20029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20030  # take no chances and rewrite it.
20031  # Note: m4 eats our [], so we need to use [ and ] instead.
20032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20033  if test "x$has_forbidden_chars" != x; then
20034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20036  fi
20037
20038    # Output is in $new_path
20039
20040  windows_path="$new_path"
20041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20042    unix_path=`$CYGPATH -u "$windows_path"`
20043    new_path="$unix_path"
20044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20046    new_path="$unix_path"
20047  fi
20048
20049    # remove trailing .exe if any
20050    new_path="${new_path/%.exe/}"
20051
20052    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20053    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20054  fi
20055
20056    else
20057      # We're on a unix platform. Hooray! :)
20058      # First separate the path from the arguments. This will split at the first
20059      # space.
20060      complete="$FOUND_MAKE"
20061      path="${complete%% *}"
20062      tmp="$complete EOL"
20063      arguments="${tmp#* }"
20064
20065      # Cannot rely on the command "which" here since it doesn't always work.
20066      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20067      if test -z "$is_absolute_path"; then
20068        # Path to executable is not absolute. Find it.
20069        IFS_save="$IFS"
20070        IFS=:
20071        for p in $PATH; do
20072          if test -f "$p/$path" && test -x "$p/$path"; then
20073            new_path="$p/$path"
20074            break
20075          fi
20076        done
20077        IFS="$IFS_save"
20078      else
20079        # This is an absolute path, we can use it without further modifications.
20080        new_path="$path"
20081      fi
20082
20083      if test "x$new_path" = x; then
20084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20085$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20086        has_space=`$ECHO "$complete" | $GREP " "`
20087        if test "x$has_space" != x; then
20088          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20089$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20090        fi
20091        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20092      fi
20093    fi
20094
20095    # Now join together the path and the arguments once again
20096    if test "x$arguments" != xEOL; then
20097      new_complete="$new_path ${arguments% *}"
20098    else
20099      new_complete="$new_path"
20100    fi
20101
20102    if test "x$complete" != "x$new_complete"; then
20103      FOUND_MAKE="$new_complete"
20104      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20105$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20106    fi
20107  fi
20108
20109        fi
20110      fi
20111    fi
20112  fi
20113
20114    fi
20115
20116    if test "x$FOUND_MAKE" = x; then
20117      if test "x$TOOLCHAIN_PATH" != x; then
20118        # We have a toolchain path, check that as well before giving up.
20119        OLD_PATH=$PATH
20120        PATH=$TOOLCHAIN_PATH:$PATH
20121        for ac_prog in gmake
20122do
20123  # Extract the first word of "$ac_prog", so it can be a program name with args.
20124set dummy $ac_prog; ac_word=$2
20125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20126$as_echo_n "checking for $ac_word... " >&6; }
20127if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20128  $as_echo_n "(cached) " >&6
20129else
20130  case $CHECK_TOOLSDIR_GMAKE in
20131  [\\/]* | ?:[\\/]*)
20132  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20133  ;;
20134  *)
20135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20136for as_dir in $PATH
20137do
20138  IFS=$as_save_IFS
20139  test -z "$as_dir" && as_dir=.
20140    for ac_exec_ext in '' $ac_executable_extensions; do
20141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20142    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20144    break 2
20145  fi
20146done
20147  done
20148IFS=$as_save_IFS
20149
20150  ;;
20151esac
20152fi
20153CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20154if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20156$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20157else
20158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20159$as_echo "no" >&6; }
20160fi
20161
20162
20163  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20164done
20165
20166
20167  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20168  DESCRIPTION="gmake in tools-dir"
20169
20170  # On Cygwin, we require a newer version of make than on other platforms
20171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20172    MAKE_VERSION_EXPR="-e 4\."
20173    MAKE_REQUIRED_VERSION="4.0"
20174   else
20175    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20176    MAKE_REQUIRED_VERSION="3.81"
20177  fi
20178
20179  if test "x$MAKE_CANDIDATE" != x; then
20180    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20181$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20182    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20183    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20184    if test "x$IS_GNU_MAKE" = x; then
20185      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20186$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20187    else
20188      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20189      if test "x$IS_MODERN_MAKE" = x; then
20190        { $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
20191$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;}
20192      else
20193        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20194          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20195            MAKE_EXPECTED_ENV='cygwin'
20196          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20197            MAKE_EXPECTED_ENV='msys'
20198          else
20199            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20200          fi
20201          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20202          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20203        else
20204          # Not relevant for non-Windows
20205          IS_MAKE_CORRECT_ENV=true
20206        fi
20207        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20208          { $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
20209$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;}
20210        else
20211          FOUND_MAKE=$MAKE_CANDIDATE
20212
20213  # Only process if variable expands to non-empty
20214
20215  if test "x$FOUND_MAKE" != x; then
20216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20217
20218  # First separate the path from the arguments. This will split at the first
20219  # space.
20220  complete="$FOUND_MAKE"
20221  path="${complete%% *}"
20222  tmp="$complete EOL"
20223  arguments="${tmp#* }"
20224
20225  # Input might be given as Windows format, start by converting to
20226  # unix format.
20227  new_path=`$CYGPATH -u "$path"`
20228
20229  # Now try to locate executable using which
20230  new_path=`$WHICH "$new_path" 2> /dev/null`
20231  # bat and cmd files are not always considered executable in cygwin causing which
20232  # to not find them
20233  if test "x$new_path" = x \
20234      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20235      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20236    new_path=`$CYGPATH -u "$path"`
20237  fi
20238  if test "x$new_path" = x; then
20239    # Oops. Which didn't find the executable.
20240    # The splitting of arguments from the executable at a space might have been incorrect,
20241    # since paths with space are more likely in Windows. Give it another try with the whole
20242    # argument.
20243    path="$complete"
20244    arguments="EOL"
20245    new_path=`$CYGPATH -u "$path"`
20246    new_path=`$WHICH "$new_path" 2> /dev/null`
20247    # bat and cmd files are not always considered executable in cygwin causing which
20248    # to not find them
20249    if test "x$new_path" = x \
20250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20252      new_path=`$CYGPATH -u "$path"`
20253    fi
20254    if test "x$new_path" = x; then
20255      # It's still not found. Now this is an unrecoverable error.
20256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20258      has_space=`$ECHO "$complete" | $GREP " "`
20259      if test "x$has_space" != x; then
20260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20262      fi
20263      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20264    fi
20265  fi
20266
20267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20270  # "foo.exe" is OK but "foo" is an error.
20271  #
20272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20273  # It is also a way to make sure we got the proper file name for the real test later on.
20274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20275  if test "x$test_shortpath" = x; then
20276    # Short path failed, file does not exist as specified.
20277    # Try adding .exe or .cmd
20278    if test -f "${new_path}.exe"; then
20279      input_to_shortpath="${new_path}.exe"
20280    elif test -f "${new_path}.cmd"; then
20281      input_to_shortpath="${new_path}.cmd"
20282    else
20283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20284$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20287      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20288    fi
20289  else
20290    input_to_shortpath="$new_path"
20291  fi
20292
20293  # Call helper function which possibly converts this using DOS-style short mode.
20294  # If so, the updated path is stored in $new_path.
20295  new_path="$input_to_shortpath"
20296
20297  input_path="$input_to_shortpath"
20298  # Check if we need to convert this using DOS-style short mode. If the path
20299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20300  # take no chances and rewrite it.
20301  # Note: m4 eats our [], so we need to use [ and ] instead.
20302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20303  if test "x$has_forbidden_chars" != x; then
20304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20308      # Going to short mode and back again did indeed matter. Since short mode is
20309      # case insensitive, let's make it lowercase to improve readability.
20310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20311      # Now convert it back to Unix-style (cygpath)
20312      input_path=`$CYGPATH -u "$shortmode_path"`
20313      new_path="$input_path"
20314    fi
20315  fi
20316
20317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20318  if test "x$test_cygdrive_prefix" = x; then
20319    # As a simple fix, exclude /usr/bin since it's not a real path.
20320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20322      # a path prefixed by /cygdrive for fixpath to work.
20323      new_path="$CYGWIN_ROOT_PATH$input_path"
20324    fi
20325  fi
20326
20327  # remove trailing .exe if any
20328  new_path="${new_path/%.exe/}"
20329
20330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20331
20332  # First separate the path from the arguments. This will split at the first
20333  # space.
20334  complete="$FOUND_MAKE"
20335  path="${complete%% *}"
20336  tmp="$complete EOL"
20337  arguments="${tmp#* }"
20338
20339  # Input might be given as Windows format, start by converting to
20340  # unix format.
20341  new_path="$path"
20342
20343  windows_path="$new_path"
20344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20345    unix_path=`$CYGPATH -u "$windows_path"`
20346    new_path="$unix_path"
20347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20349    new_path="$unix_path"
20350  fi
20351
20352
20353  # Now try to locate executable using which
20354  new_path=`$WHICH "$new_path" 2> /dev/null`
20355
20356  if test "x$new_path" = x; then
20357    # Oops. Which didn't find the executable.
20358    # The splitting of arguments from the executable at a space might have been incorrect,
20359    # since paths with space are more likely in Windows. Give it another try with the whole
20360    # argument.
20361    path="$complete"
20362    arguments="EOL"
20363    new_path="$path"
20364
20365  windows_path="$new_path"
20366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20367    unix_path=`$CYGPATH -u "$windows_path"`
20368    new_path="$unix_path"
20369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20371    new_path="$unix_path"
20372  fi
20373
20374
20375    new_path=`$WHICH "$new_path" 2> /dev/null`
20376    # bat and cmd files are not always considered executable in MSYS causing which
20377    # to not find them
20378    if test "x$new_path" = x \
20379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20381      new_path="$path"
20382
20383  windows_path="$new_path"
20384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20385    unix_path=`$CYGPATH -u "$windows_path"`
20386    new_path="$unix_path"
20387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20389    new_path="$unix_path"
20390  fi
20391
20392    fi
20393
20394    if test "x$new_path" = x; then
20395      # It's still not found. Now this is an unrecoverable error.
20396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20397$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20398      has_space=`$ECHO "$complete" | $GREP " "`
20399      if test "x$has_space" != x; then
20400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20402      fi
20403      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20404    fi
20405  fi
20406
20407  # Now new_path has a complete unix path to the binary
20408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20409    # Keep paths in /bin as-is, but remove trailing .exe if any
20410    new_path="${new_path/%.exe/}"
20411    # Do not save /bin paths to all_fixpath_prefixes!
20412  else
20413    # Not in mixed or Windows style, start by that.
20414    new_path=`cmd //c echo $new_path`
20415
20416  input_path="$new_path"
20417  # Check if we need to convert this using DOS-style short mode. If the path
20418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20419  # take no chances and rewrite it.
20420  # Note: m4 eats our [], so we need to use [ and ] instead.
20421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20422  if test "x$has_forbidden_chars" != x; then
20423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20425  fi
20426
20427    # Output is in $new_path
20428
20429  windows_path="$new_path"
20430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20431    unix_path=`$CYGPATH -u "$windows_path"`
20432    new_path="$unix_path"
20433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20435    new_path="$unix_path"
20436  fi
20437
20438    # remove trailing .exe if any
20439    new_path="${new_path/%.exe/}"
20440
20441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20443  fi
20444
20445    else
20446      # We're on a unix platform. Hooray! :)
20447      # First separate the path from the arguments. This will split at the first
20448      # space.
20449      complete="$FOUND_MAKE"
20450      path="${complete%% *}"
20451      tmp="$complete EOL"
20452      arguments="${tmp#* }"
20453
20454      # Cannot rely on the command "which" here since it doesn't always work.
20455      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20456      if test -z "$is_absolute_path"; then
20457        # Path to executable is not absolute. Find it.
20458        IFS_save="$IFS"
20459        IFS=:
20460        for p in $PATH; do
20461          if test -f "$p/$path" && test -x "$p/$path"; then
20462            new_path="$p/$path"
20463            break
20464          fi
20465        done
20466        IFS="$IFS_save"
20467      else
20468        # This is an absolute path, we can use it without further modifications.
20469        new_path="$path"
20470      fi
20471
20472      if test "x$new_path" = x; then
20473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20474$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20475        has_space=`$ECHO "$complete" | $GREP " "`
20476        if test "x$has_space" != x; then
20477          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20479        fi
20480        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20481      fi
20482    fi
20483
20484    # Now join together the path and the arguments once again
20485    if test "x$arguments" != xEOL; then
20486      new_complete="$new_path ${arguments% *}"
20487    else
20488      new_complete="$new_path"
20489    fi
20490
20491    if test "x$complete" != "x$new_complete"; then
20492      FOUND_MAKE="$new_complete"
20493      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20494$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20495    fi
20496  fi
20497
20498        fi
20499      fi
20500    fi
20501  fi
20502
20503        if test "x$FOUND_MAKE" = x; then
20504          for ac_prog in make
20505do
20506  # Extract the first word of "$ac_prog", so it can be a program name with args.
20507set dummy $ac_prog; ac_word=$2
20508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20509$as_echo_n "checking for $ac_word... " >&6; }
20510if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20511  $as_echo_n "(cached) " >&6
20512else
20513  case $CHECK_TOOLSDIR_MAKE in
20514  [\\/]* | ?:[\\/]*)
20515  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20516  ;;
20517  *)
20518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20519for as_dir in $PATH
20520do
20521  IFS=$as_save_IFS
20522  test -z "$as_dir" && as_dir=.
20523    for ac_exec_ext in '' $ac_executable_extensions; do
20524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20525    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20527    break 2
20528  fi
20529done
20530  done
20531IFS=$as_save_IFS
20532
20533  ;;
20534esac
20535fi
20536CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20537if test -n "$CHECK_TOOLSDIR_MAKE"; then
20538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20539$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20540else
20541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20542$as_echo "no" >&6; }
20543fi
20544
20545
20546  test -n "$CHECK_TOOLSDIR_MAKE" && break
20547done
20548
20549
20550  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20551  DESCRIPTION="make in tools-dir"
20552
20553  # On Cygwin, we require a newer version of make than on other platforms
20554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20555    MAKE_VERSION_EXPR="-e 4\."
20556    MAKE_REQUIRED_VERSION="4.0"
20557   else
20558    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20559    MAKE_REQUIRED_VERSION="3.81"
20560  fi
20561
20562  if test "x$MAKE_CANDIDATE" != x; then
20563    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20564$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20565    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20566    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20567    if test "x$IS_GNU_MAKE" = x; then
20568      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20569$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20570    else
20571      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20572      if test "x$IS_MODERN_MAKE" = x; then
20573        { $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
20574$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;}
20575      else
20576        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20577          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20578            MAKE_EXPECTED_ENV='cygwin'
20579          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20580            MAKE_EXPECTED_ENV='msys'
20581          else
20582            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20583          fi
20584          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20585          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20586        else
20587          # Not relevant for non-Windows
20588          IS_MAKE_CORRECT_ENV=true
20589        fi
20590        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20591          { $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
20592$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;}
20593        else
20594          FOUND_MAKE=$MAKE_CANDIDATE
20595
20596  # Only process if variable expands to non-empty
20597
20598  if test "x$FOUND_MAKE" != x; then
20599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20600
20601  # First separate the path from the arguments. This will split at the first
20602  # space.
20603  complete="$FOUND_MAKE"
20604  path="${complete%% *}"
20605  tmp="$complete EOL"
20606  arguments="${tmp#* }"
20607
20608  # Input might be given as Windows format, start by converting to
20609  # unix format.
20610  new_path=`$CYGPATH -u "$path"`
20611
20612  # Now try to locate executable using which
20613  new_path=`$WHICH "$new_path" 2> /dev/null`
20614  # bat and cmd files are not always considered executable in cygwin causing which
20615  # to not find them
20616  if test "x$new_path" = x \
20617      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20618      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20619    new_path=`$CYGPATH -u "$path"`
20620  fi
20621  if test "x$new_path" = x; then
20622    # Oops. Which didn't find the executable.
20623    # The splitting of arguments from the executable at a space might have been incorrect,
20624    # since paths with space are more likely in Windows. Give it another try with the whole
20625    # argument.
20626    path="$complete"
20627    arguments="EOL"
20628    new_path=`$CYGPATH -u "$path"`
20629    new_path=`$WHICH "$new_path" 2> /dev/null`
20630    # bat and cmd files are not always considered executable in cygwin causing which
20631    # to not find them
20632    if test "x$new_path" = x \
20633        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20634        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20635      new_path=`$CYGPATH -u "$path"`
20636    fi
20637    if test "x$new_path" = x; then
20638      # It's still not found. Now this is an unrecoverable error.
20639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20641      has_space=`$ECHO "$complete" | $GREP " "`
20642      if test "x$has_space" != x; then
20643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20645      fi
20646      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20647    fi
20648  fi
20649
20650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20653  # "foo.exe" is OK but "foo" is an error.
20654  #
20655  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20656  # It is also a way to make sure we got the proper file name for the real test later on.
20657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20658  if test "x$test_shortpath" = x; then
20659    # Short path failed, file does not exist as specified.
20660    # Try adding .exe or .cmd
20661    if test -f "${new_path}.exe"; then
20662      input_to_shortpath="${new_path}.exe"
20663    elif test -f "${new_path}.cmd"; then
20664      input_to_shortpath="${new_path}.cmd"
20665    else
20666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20668      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20669$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20671    fi
20672  else
20673    input_to_shortpath="$new_path"
20674  fi
20675
20676  # Call helper function which possibly converts this using DOS-style short mode.
20677  # If so, the updated path is stored in $new_path.
20678  new_path="$input_to_shortpath"
20679
20680  input_path="$input_to_shortpath"
20681  # Check if we need to convert this using DOS-style short mode. If the path
20682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20683  # take no chances and rewrite it.
20684  # Note: m4 eats our [], so we need to use [ and ] instead.
20685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20686  if test "x$has_forbidden_chars" != x; then
20687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20691      # Going to short mode and back again did indeed matter. Since short mode is
20692      # case insensitive, let's make it lowercase to improve readability.
20693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20694      # Now convert it back to Unix-style (cygpath)
20695      input_path=`$CYGPATH -u "$shortmode_path"`
20696      new_path="$input_path"
20697    fi
20698  fi
20699
20700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20701  if test "x$test_cygdrive_prefix" = x; then
20702    # As a simple fix, exclude /usr/bin since it's not a real path.
20703    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20705      # a path prefixed by /cygdrive for fixpath to work.
20706      new_path="$CYGWIN_ROOT_PATH$input_path"
20707    fi
20708  fi
20709
20710  # remove trailing .exe if any
20711  new_path="${new_path/%.exe/}"
20712
20713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20714
20715  # First separate the path from the arguments. This will split at the first
20716  # space.
20717  complete="$FOUND_MAKE"
20718  path="${complete%% *}"
20719  tmp="$complete EOL"
20720  arguments="${tmp#* }"
20721
20722  # Input might be given as Windows format, start by converting to
20723  # unix format.
20724  new_path="$path"
20725
20726  windows_path="$new_path"
20727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20728    unix_path=`$CYGPATH -u "$windows_path"`
20729    new_path="$unix_path"
20730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20732    new_path="$unix_path"
20733  fi
20734
20735
20736  # Now try to locate executable using which
20737  new_path=`$WHICH "$new_path" 2> /dev/null`
20738
20739  if test "x$new_path" = x; then
20740    # Oops. Which didn't find the executable.
20741    # The splitting of arguments from the executable at a space might have been incorrect,
20742    # since paths with space are more likely in Windows. Give it another try with the whole
20743    # argument.
20744    path="$complete"
20745    arguments="EOL"
20746    new_path="$path"
20747
20748  windows_path="$new_path"
20749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20750    unix_path=`$CYGPATH -u "$windows_path"`
20751    new_path="$unix_path"
20752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20754    new_path="$unix_path"
20755  fi
20756
20757
20758    new_path=`$WHICH "$new_path" 2> /dev/null`
20759    # bat and cmd files are not always considered executable in MSYS causing which
20760    # to not find them
20761    if test "x$new_path" = x \
20762        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20763        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20764      new_path="$path"
20765
20766  windows_path="$new_path"
20767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20768    unix_path=`$CYGPATH -u "$windows_path"`
20769    new_path="$unix_path"
20770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20772    new_path="$unix_path"
20773  fi
20774
20775    fi
20776
20777    if test "x$new_path" = x; then
20778      # It's still not found. Now this is an unrecoverable error.
20779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20780$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20781      has_space=`$ECHO "$complete" | $GREP " "`
20782      if test "x$has_space" != x; then
20783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20785      fi
20786      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20787    fi
20788  fi
20789
20790  # Now new_path has a complete unix path to the binary
20791  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20792    # Keep paths in /bin as-is, but remove trailing .exe if any
20793    new_path="${new_path/%.exe/}"
20794    # Do not save /bin paths to all_fixpath_prefixes!
20795  else
20796    # Not in mixed or Windows style, start by that.
20797    new_path=`cmd //c echo $new_path`
20798
20799  input_path="$new_path"
20800  # Check if we need to convert this using DOS-style short mode. If the path
20801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20802  # take no chances and rewrite it.
20803  # Note: m4 eats our [], so we need to use [ and ] instead.
20804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20805  if test "x$has_forbidden_chars" != x; then
20806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20808  fi
20809
20810    # Output is in $new_path
20811
20812  windows_path="$new_path"
20813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20814    unix_path=`$CYGPATH -u "$windows_path"`
20815    new_path="$unix_path"
20816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20818    new_path="$unix_path"
20819  fi
20820
20821    # remove trailing .exe if any
20822    new_path="${new_path/%.exe/}"
20823
20824    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20825    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20826  fi
20827
20828    else
20829      # We're on a unix platform. Hooray! :)
20830      # First separate the path from the arguments. This will split at the first
20831      # space.
20832      complete="$FOUND_MAKE"
20833      path="${complete%% *}"
20834      tmp="$complete EOL"
20835      arguments="${tmp#* }"
20836
20837      # Cannot rely on the command "which" here since it doesn't always work.
20838      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20839      if test -z "$is_absolute_path"; then
20840        # Path to executable is not absolute. Find it.
20841        IFS_save="$IFS"
20842        IFS=:
20843        for p in $PATH; do
20844          if test -f "$p/$path" && test -x "$p/$path"; then
20845            new_path="$p/$path"
20846            break
20847          fi
20848        done
20849        IFS="$IFS_save"
20850      else
20851        # This is an absolute path, we can use it without further modifications.
20852        new_path="$path"
20853      fi
20854
20855      if test "x$new_path" = x; then
20856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20857$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20858        has_space=`$ECHO "$complete" | $GREP " "`
20859        if test "x$has_space" != x; then
20860          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20861$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20862        fi
20863        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20864      fi
20865    fi
20866
20867    # Now join together the path and the arguments once again
20868    if test "x$arguments" != xEOL; then
20869      new_complete="$new_path ${arguments% *}"
20870    else
20871      new_complete="$new_path"
20872    fi
20873
20874    if test "x$complete" != "x$new_complete"; then
20875      FOUND_MAKE="$new_complete"
20876      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20877$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20878    fi
20879  fi
20880
20881        fi
20882      fi
20883    fi
20884  fi
20885
20886        fi
20887        PATH=$OLD_PATH
20888      fi
20889    fi
20890
20891    if test "x$FOUND_MAKE" = x; then
20892      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
20893    fi
20894
20895    else
20896      # If it succeeded, then it was overridden by the user. We will use it
20897      # for the tool.
20898
20899      # First remove it from the list of overridden variables, so we can test
20900      # for unknown variables in the end.
20901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20902
20903      # Check if we try to supply an empty value
20904      if test "x$MAKE" = x; then
20905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20906$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20908$as_echo_n "checking for MAKE... " >&6; }
20909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20910$as_echo "disabled" >&6; }
20911      else
20912        # Check if the provided tool contains a complete path.
20913        tool_specified="$MAKE"
20914        tool_basename="${tool_specified##*/}"
20915        if test "x$tool_basename" = "x$tool_specified"; then
20916          # A command without a complete path is provided, search $PATH.
20917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20918$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20919          # Extract the first word of "$tool_basename", so it can be a program name with args.
20920set dummy $tool_basename; ac_word=$2
20921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20922$as_echo_n "checking for $ac_word... " >&6; }
20923if ${ac_cv_path_MAKE+:} false; then :
20924  $as_echo_n "(cached) " >&6
20925else
20926  case $MAKE in
20927  [\\/]* | ?:[\\/]*)
20928  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20929  ;;
20930  *)
20931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20932for as_dir in $PATH
20933do
20934  IFS=$as_save_IFS
20935  test -z "$as_dir" && as_dir=.
20936    for ac_exec_ext in '' $ac_executable_extensions; do
20937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20938    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20940    break 2
20941  fi
20942done
20943  done
20944IFS=$as_save_IFS
20945
20946  ;;
20947esac
20948fi
20949MAKE=$ac_cv_path_MAKE
20950if test -n "$MAKE"; then
20951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20952$as_echo "$MAKE" >&6; }
20953else
20954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20955$as_echo "no" >&6; }
20956fi
20957
20958
20959          if test "x$MAKE" = x; then
20960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20961          fi
20962        else
20963          # Otherwise we believe it is a complete path. Use it as it is.
20964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20965$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20967$as_echo_n "checking for MAKE... " >&6; }
20968          if test ! -x "$tool_specified"; then
20969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20970$as_echo "not found" >&6; }
20971            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20972          fi
20973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20974$as_echo "$tool_specified" >&6; }
20975        fi
20976      fi
20977    fi
20978
20979    # If MAKE was set by user, verify the version
20980
20981  MAKE_CANDIDATE=""$MAKE""
20982  DESCRIPTION="user supplied MAKE=$MAKE"
20983
20984  # On Cygwin, we require a newer version of make than on other platforms
20985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20986    MAKE_VERSION_EXPR="-e 4\."
20987    MAKE_REQUIRED_VERSION="4.0"
20988   else
20989    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20990    MAKE_REQUIRED_VERSION="3.81"
20991  fi
20992
20993  if test "x$MAKE_CANDIDATE" != x; then
20994    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20995$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20996    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20997    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20998    if test "x$IS_GNU_MAKE" = x; then
20999      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21000$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21001    else
21002      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21003      if test "x$IS_MODERN_MAKE" = x; then
21004        { $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
21005$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;}
21006      else
21007        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21008          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21009            MAKE_EXPECTED_ENV='cygwin'
21010          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21011            MAKE_EXPECTED_ENV='msys'
21012          else
21013            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21014          fi
21015          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21016          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21017        else
21018          # Not relevant for non-Windows
21019          IS_MAKE_CORRECT_ENV=true
21020        fi
21021        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21022          { $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
21023$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;}
21024        else
21025          FOUND_MAKE=$MAKE_CANDIDATE
21026
21027  # Only process if variable expands to non-empty
21028
21029  if test "x$FOUND_MAKE" != x; then
21030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21031
21032  # First separate the path from the arguments. This will split at the first
21033  # space.
21034  complete="$FOUND_MAKE"
21035  path="${complete%% *}"
21036  tmp="$complete EOL"
21037  arguments="${tmp#* }"
21038
21039  # Input might be given as Windows format, start by converting to
21040  # unix format.
21041  new_path=`$CYGPATH -u "$path"`
21042
21043  # Now try to locate executable using which
21044  new_path=`$WHICH "$new_path" 2> /dev/null`
21045  # bat and cmd files are not always considered executable in cygwin causing which
21046  # to not find them
21047  if test "x$new_path" = x \
21048      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21049      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21050    new_path=`$CYGPATH -u "$path"`
21051  fi
21052  if test "x$new_path" = x; then
21053    # Oops. Which didn't find the executable.
21054    # The splitting of arguments from the executable at a space might have been incorrect,
21055    # since paths with space are more likely in Windows. Give it another try with the whole
21056    # argument.
21057    path="$complete"
21058    arguments="EOL"
21059    new_path=`$CYGPATH -u "$path"`
21060    new_path=`$WHICH "$new_path" 2> /dev/null`
21061    # bat and cmd files are not always considered executable in cygwin causing which
21062    # to not find them
21063    if test "x$new_path" = x \
21064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21066      new_path=`$CYGPATH -u "$path"`
21067    fi
21068    if test "x$new_path" = x; then
21069      # It's still not found. Now this is an unrecoverable error.
21070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21071$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21072      has_space=`$ECHO "$complete" | $GREP " "`
21073      if test "x$has_space" != x; then
21074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21076      fi
21077      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21078    fi
21079  fi
21080
21081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21084  # "foo.exe" is OK but "foo" is an error.
21085  #
21086  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21087  # It is also a way to make sure we got the proper file name for the real test later on.
21088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21089  if test "x$test_shortpath" = x; then
21090    # Short path failed, file does not exist as specified.
21091    # Try adding .exe or .cmd
21092    if test -f "${new_path}.exe"; then
21093      input_to_shortpath="${new_path}.exe"
21094    elif test -f "${new_path}.cmd"; then
21095      input_to_shortpath="${new_path}.cmd"
21096    else
21097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21098$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21101      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21102    fi
21103  else
21104    input_to_shortpath="$new_path"
21105  fi
21106
21107  # Call helper function which possibly converts this using DOS-style short mode.
21108  # If so, the updated path is stored in $new_path.
21109  new_path="$input_to_shortpath"
21110
21111  input_path="$input_to_shortpath"
21112  # Check if we need to convert this using DOS-style short mode. If the path
21113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21114  # take no chances and rewrite it.
21115  # Note: m4 eats our [], so we need to use [ and ] instead.
21116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21117  if test "x$has_forbidden_chars" != x; then
21118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21122      # Going to short mode and back again did indeed matter. Since short mode is
21123      # case insensitive, let's make it lowercase to improve readability.
21124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21125      # Now convert it back to Unix-style (cygpath)
21126      input_path=`$CYGPATH -u "$shortmode_path"`
21127      new_path="$input_path"
21128    fi
21129  fi
21130
21131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21132  if test "x$test_cygdrive_prefix" = x; then
21133    # As a simple fix, exclude /usr/bin since it's not a real path.
21134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21136      # a path prefixed by /cygdrive for fixpath to work.
21137      new_path="$CYGWIN_ROOT_PATH$input_path"
21138    fi
21139  fi
21140
21141  # remove trailing .exe if any
21142  new_path="${new_path/%.exe/}"
21143
21144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21145
21146  # First separate the path from the arguments. This will split at the first
21147  # space.
21148  complete="$FOUND_MAKE"
21149  path="${complete%% *}"
21150  tmp="$complete EOL"
21151  arguments="${tmp#* }"
21152
21153  # Input might be given as Windows format, start by converting to
21154  # unix format.
21155  new_path="$path"
21156
21157  windows_path="$new_path"
21158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21159    unix_path=`$CYGPATH -u "$windows_path"`
21160    new_path="$unix_path"
21161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21163    new_path="$unix_path"
21164  fi
21165
21166
21167  # Now try to locate executable using which
21168  new_path=`$WHICH "$new_path" 2> /dev/null`
21169
21170  if test "x$new_path" = x; then
21171    # Oops. Which didn't find the executable.
21172    # The splitting of arguments from the executable at a space might have been incorrect,
21173    # since paths with space are more likely in Windows. Give it another try with the whole
21174    # argument.
21175    path="$complete"
21176    arguments="EOL"
21177    new_path="$path"
21178
21179  windows_path="$new_path"
21180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21181    unix_path=`$CYGPATH -u "$windows_path"`
21182    new_path="$unix_path"
21183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21185    new_path="$unix_path"
21186  fi
21187
21188
21189    new_path=`$WHICH "$new_path" 2> /dev/null`
21190    # bat and cmd files are not always considered executable in MSYS causing which
21191    # to not find them
21192    if test "x$new_path" = x \
21193        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21194        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21195      new_path="$path"
21196
21197  windows_path="$new_path"
21198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21199    unix_path=`$CYGPATH -u "$windows_path"`
21200    new_path="$unix_path"
21201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21203    new_path="$unix_path"
21204  fi
21205
21206    fi
21207
21208    if test "x$new_path" = x; then
21209      # It's still not found. Now this is an unrecoverable error.
21210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21211$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21212      has_space=`$ECHO "$complete" | $GREP " "`
21213      if test "x$has_space" != x; then
21214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21216      fi
21217      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21218    fi
21219  fi
21220
21221  # Now new_path has a complete unix path to the binary
21222  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21223    # Keep paths in /bin as-is, but remove trailing .exe if any
21224    new_path="${new_path/%.exe/}"
21225    # Do not save /bin paths to all_fixpath_prefixes!
21226  else
21227    # Not in mixed or Windows style, start by that.
21228    new_path=`cmd //c echo $new_path`
21229
21230  input_path="$new_path"
21231  # Check if we need to convert this using DOS-style short mode. If the path
21232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21233  # take no chances and rewrite it.
21234  # Note: m4 eats our [], so we need to use [ and ] instead.
21235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21236  if test "x$has_forbidden_chars" != x; then
21237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21239  fi
21240
21241    # Output is in $new_path
21242
21243  windows_path="$new_path"
21244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21245    unix_path=`$CYGPATH -u "$windows_path"`
21246    new_path="$unix_path"
21247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21249    new_path="$unix_path"
21250  fi
21251
21252    # remove trailing .exe if any
21253    new_path="${new_path/%.exe/}"
21254
21255    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21256    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21257  fi
21258
21259    else
21260      # We're on a unix platform. Hooray! :)
21261      # First separate the path from the arguments. This will split at the first
21262      # space.
21263      complete="$FOUND_MAKE"
21264      path="${complete%% *}"
21265      tmp="$complete EOL"
21266      arguments="${tmp#* }"
21267
21268      # Cannot rely on the command "which" here since it doesn't always work.
21269      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21270      if test -z "$is_absolute_path"; then
21271        # Path to executable is not absolute. Find it.
21272        IFS_save="$IFS"
21273        IFS=:
21274        for p in $PATH; do
21275          if test -f "$p/$path" && test -x "$p/$path"; then
21276            new_path="$p/$path"
21277            break
21278          fi
21279        done
21280        IFS="$IFS_save"
21281      else
21282        # This is an absolute path, we can use it without further modifications.
21283        new_path="$path"
21284      fi
21285
21286      if test "x$new_path" = x; then
21287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21288$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21289        has_space=`$ECHO "$complete" | $GREP " "`
21290        if test "x$has_space" != x; then
21291          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21292$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21293        fi
21294        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21295      fi
21296    fi
21297
21298    # Now join together the path and the arguments once again
21299    if test "x$arguments" != xEOL; then
21300      new_complete="$new_path ${arguments% *}"
21301    else
21302      new_complete="$new_path"
21303    fi
21304
21305    if test "x$complete" != "x$new_complete"; then
21306      FOUND_MAKE="$new_complete"
21307      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21308$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21309    fi
21310  fi
21311
21312        fi
21313      fi
21314    fi
21315  fi
21316
21317    if test "x$FOUND_MAKE" = x; then
21318      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21319    fi
21320
21321  fi
21322
21323
21324  MAKE=$FOUND_MAKE
21325
21326  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21327$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21328
21329
21330  # Check if make supports the output sync option and if so, setup using it.
21331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21332$as_echo_n "checking if make --output-sync is supported... " >&6; }
21333  if $MAKE --version -O > /dev/null 2>&1; then
21334    OUTPUT_SYNC_SUPPORTED=true
21335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21336$as_echo "yes" >&6; }
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21338$as_echo_n "checking for output-sync value... " >&6; }
21339
21340# Check whether --with-output-sync was given.
21341if test "${with_output_sync+set}" = set; then :
21342  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21343fi
21344
21345    if test "x$OUTPUT_SYNC" = "x"; then
21346      OUTPUT_SYNC=none
21347    fi
21348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21349$as_echo "$OUTPUT_SYNC" >&6; }
21350    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21351      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21352    fi
21353  else
21354    OUTPUT_SYNC_SUPPORTED=false
21355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21356$as_echo "no" >&6; }
21357  fi
21358
21359
21360
21361
21362
21363
21364  # Test if find supports -delete
21365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21366$as_echo_n "checking if find supports -delete... " >&6; }
21367  FIND_DELETE="-delete"
21368
21369  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21370
21371  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21372
21373  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21374  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21375    # No, it does not.
21376    $RM $DELETEDIR/TestIfFindSupportsDelete
21377    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21378      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21379      FIND_DELETE="-print | $XARGS $RM"
21380    else
21381      FIND_DELETE="-exec $RM \{\} \+"
21382    fi
21383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21384$as_echo "no" >&6; }
21385  else
21386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21387$as_echo "yes" >&6; }
21388  fi
21389  $RMDIR $DELETEDIR
21390
21391
21392
21393  # Test which kind of tar was found
21394  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21395    TAR_TYPE="gnu"
21396  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21397    TAR_TYPE="bsd"
21398  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21399    TAR_TYPE="bsd"
21400  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21401    TAR_TYPE="solaris"
21402  fi
21403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21404$as_echo_n "checking what type of tar was found... " >&6; }
21405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21406$as_echo "$TAR_TYPE" >&6; }
21407
21408  TAR_CREATE_FILE_PARAM=""
21409
21410  if test "x$TAR_TYPE" = "xgnu"; then
21411    TAR_INCLUDE_PARAM="T"
21412    TAR_SUPPORTS_TRANSFORM="true"
21413    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21414      # When using gnu tar for Solaris targets, need to use compatibility mode
21415      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21416    fi
21417  else
21418    TAR_INCLUDE_PARAM="I"
21419    TAR_SUPPORTS_TRANSFORM="false"
21420  fi
21421
21422
21423
21424
21425
21426
21427  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21428  # This is a problem for the grep resident on AIX.
21429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21430$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21431  # Multiple subsequent spaces..
21432  STACK_SPACES='aaa   bbb   ccc'
21433  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21434  # patterns in it.
21435  STACK_LIST=${STACK_SPACES// /$'\n'}
21436  NEEDLE_SPACES='ccc bbb aaa'
21437  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21438  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21439  if test "x$RESULT" == "x"; then
21440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21441$as_echo "yes" >&6; }
21442  else
21443    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21444      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21445    fi
21446    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21447  fi
21448
21449
21450  # These tools might not be installed by default,
21451  # need hint on how to install them.
21452
21453
21454
21455  # Publish this variable in the help.
21456
21457
21458  if [ -z "${UNZIP+x}" ]; then
21459    # The variable is not set by user, try to locate tool using the code snippet
21460    for ac_prog in unzip
21461do
21462  # Extract the first word of "$ac_prog", so it can be a program name with args.
21463set dummy $ac_prog; ac_word=$2
21464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21465$as_echo_n "checking for $ac_word... " >&6; }
21466if ${ac_cv_path_UNZIP+:} false; then :
21467  $as_echo_n "(cached) " >&6
21468else
21469  case $UNZIP in
21470  [\\/]* | ?:[\\/]*)
21471  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21472  ;;
21473  *)
21474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21475for as_dir in $PATH
21476do
21477  IFS=$as_save_IFS
21478  test -z "$as_dir" && as_dir=.
21479    for ac_exec_ext in '' $ac_executable_extensions; do
21480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21481    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21483    break 2
21484  fi
21485done
21486  done
21487IFS=$as_save_IFS
21488
21489  ;;
21490esac
21491fi
21492UNZIP=$ac_cv_path_UNZIP
21493if test -n "$UNZIP"; then
21494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21495$as_echo "$UNZIP" >&6; }
21496else
21497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21498$as_echo "no" >&6; }
21499fi
21500
21501
21502  test -n "$UNZIP" && break
21503done
21504
21505  else
21506    # The variable is set, but is it from the command line or the environment?
21507
21508    # Try to remove the string !UNZIP! from our list.
21509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21511      # If it failed, the variable was not from the command line. Ignore it,
21512      # but warn the user (except for BASH, which is always set by the calling BASH).
21513      if test "xUNZIP" != xBASH; then
21514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21515$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21516      fi
21517      # Try to locate tool using the code snippet
21518      for ac_prog in unzip
21519do
21520  # Extract the first word of "$ac_prog", so it can be a program name with args.
21521set dummy $ac_prog; ac_word=$2
21522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21523$as_echo_n "checking for $ac_word... " >&6; }
21524if ${ac_cv_path_UNZIP+:} false; then :
21525  $as_echo_n "(cached) " >&6
21526else
21527  case $UNZIP in
21528  [\\/]* | ?:[\\/]*)
21529  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21530  ;;
21531  *)
21532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21533for as_dir in $PATH
21534do
21535  IFS=$as_save_IFS
21536  test -z "$as_dir" && as_dir=.
21537    for ac_exec_ext in '' $ac_executable_extensions; do
21538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21539    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21541    break 2
21542  fi
21543done
21544  done
21545IFS=$as_save_IFS
21546
21547  ;;
21548esac
21549fi
21550UNZIP=$ac_cv_path_UNZIP
21551if test -n "$UNZIP"; then
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21553$as_echo "$UNZIP" >&6; }
21554else
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21556$as_echo "no" >&6; }
21557fi
21558
21559
21560  test -n "$UNZIP" && break
21561done
21562
21563    else
21564      # If it succeeded, then it was overridden by the user. We will use it
21565      # for the tool.
21566
21567      # First remove it from the list of overridden variables, so we can test
21568      # for unknown variables in the end.
21569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21570
21571      # Check if we try to supply an empty value
21572      if test "x$UNZIP" = x; then
21573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21574$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21576$as_echo_n "checking for UNZIP... " >&6; }
21577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21578$as_echo "disabled" >&6; }
21579      else
21580        # Check if the provided tool contains a complete path.
21581        tool_specified="$UNZIP"
21582        tool_basename="${tool_specified##*/}"
21583        if test "x$tool_basename" = "x$tool_specified"; then
21584          # A command without a complete path is provided, search $PATH.
21585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21586$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21587          # Extract the first word of "$tool_basename", so it can be a program name with args.
21588set dummy $tool_basename; ac_word=$2
21589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21590$as_echo_n "checking for $ac_word... " >&6; }
21591if ${ac_cv_path_UNZIP+:} false; then :
21592  $as_echo_n "(cached) " >&6
21593else
21594  case $UNZIP in
21595  [\\/]* | ?:[\\/]*)
21596  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21597  ;;
21598  *)
21599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21600for as_dir in $PATH
21601do
21602  IFS=$as_save_IFS
21603  test -z "$as_dir" && as_dir=.
21604    for ac_exec_ext in '' $ac_executable_extensions; do
21605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21606    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21608    break 2
21609  fi
21610done
21611  done
21612IFS=$as_save_IFS
21613
21614  ;;
21615esac
21616fi
21617UNZIP=$ac_cv_path_UNZIP
21618if test -n "$UNZIP"; then
21619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21620$as_echo "$UNZIP" >&6; }
21621else
21622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21623$as_echo "no" >&6; }
21624fi
21625
21626
21627          if test "x$UNZIP" = x; then
21628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21629          fi
21630        else
21631          # Otherwise we believe it is a complete path. Use it as it is.
21632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21633$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21635$as_echo_n "checking for UNZIP... " >&6; }
21636          if test ! -x "$tool_specified"; then
21637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21638$as_echo "not found" >&6; }
21639            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21640          fi
21641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21642$as_echo "$tool_specified" >&6; }
21643        fi
21644      fi
21645    fi
21646
21647  fi
21648
21649
21650
21651  if test "x$UNZIP" = x; then
21652    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21653  fi
21654
21655
21656  # Since zip uses "ZIP" as a environment variable for passing options, we need
21657  # to name our variable differently, hence ZIPEXE.
21658
21659
21660
21661  # Publish this variable in the help.
21662
21663
21664  if [ -z "${ZIPEXE+x}" ]; then
21665    # The variable is not set by user, try to locate tool using the code snippet
21666    for ac_prog in zip
21667do
21668  # Extract the first word of "$ac_prog", so it can be a program name with args.
21669set dummy $ac_prog; ac_word=$2
21670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21671$as_echo_n "checking for $ac_word... " >&6; }
21672if ${ac_cv_path_ZIPEXE+:} false; then :
21673  $as_echo_n "(cached) " >&6
21674else
21675  case $ZIPEXE in
21676  [\\/]* | ?:[\\/]*)
21677  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21678  ;;
21679  *)
21680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21681for as_dir in $PATH
21682do
21683  IFS=$as_save_IFS
21684  test -z "$as_dir" && as_dir=.
21685    for ac_exec_ext in '' $ac_executable_extensions; do
21686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21687    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21689    break 2
21690  fi
21691done
21692  done
21693IFS=$as_save_IFS
21694
21695  ;;
21696esac
21697fi
21698ZIPEXE=$ac_cv_path_ZIPEXE
21699if test -n "$ZIPEXE"; then
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21701$as_echo "$ZIPEXE" >&6; }
21702else
21703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21704$as_echo "no" >&6; }
21705fi
21706
21707
21708  test -n "$ZIPEXE" && break
21709done
21710
21711  else
21712    # The variable is set, but is it from the command line or the environment?
21713
21714    # Try to remove the string !ZIPEXE! from our list.
21715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21717      # If it failed, the variable was not from the command line. Ignore it,
21718      # but warn the user (except for BASH, which is always set by the calling BASH).
21719      if test "xZIPEXE" != xBASH; then
21720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21721$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21722      fi
21723      # Try to locate tool using the code snippet
21724      for ac_prog in zip
21725do
21726  # Extract the first word of "$ac_prog", so it can be a program name with args.
21727set dummy $ac_prog; ac_word=$2
21728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21729$as_echo_n "checking for $ac_word... " >&6; }
21730if ${ac_cv_path_ZIPEXE+:} false; then :
21731  $as_echo_n "(cached) " >&6
21732else
21733  case $ZIPEXE in
21734  [\\/]* | ?:[\\/]*)
21735  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21736  ;;
21737  *)
21738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21739for as_dir in $PATH
21740do
21741  IFS=$as_save_IFS
21742  test -z "$as_dir" && as_dir=.
21743    for ac_exec_ext in '' $ac_executable_extensions; do
21744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21745    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21747    break 2
21748  fi
21749done
21750  done
21751IFS=$as_save_IFS
21752
21753  ;;
21754esac
21755fi
21756ZIPEXE=$ac_cv_path_ZIPEXE
21757if test -n "$ZIPEXE"; then
21758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21759$as_echo "$ZIPEXE" >&6; }
21760else
21761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21762$as_echo "no" >&6; }
21763fi
21764
21765
21766  test -n "$ZIPEXE" && break
21767done
21768
21769    else
21770      # If it succeeded, then it was overridden by the user. We will use it
21771      # for the tool.
21772
21773      # First remove it from the list of overridden variables, so we can test
21774      # for unknown variables in the end.
21775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21776
21777      # Check if we try to supply an empty value
21778      if test "x$ZIPEXE" = x; then
21779        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21780$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21782$as_echo_n "checking for ZIPEXE... " >&6; }
21783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21784$as_echo "disabled" >&6; }
21785      else
21786        # Check if the provided tool contains a complete path.
21787        tool_specified="$ZIPEXE"
21788        tool_basename="${tool_specified##*/}"
21789        if test "x$tool_basename" = "x$tool_specified"; then
21790          # A command without a complete path is provided, search $PATH.
21791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21792$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21793          # Extract the first word of "$tool_basename", so it can be a program name with args.
21794set dummy $tool_basename; ac_word=$2
21795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21796$as_echo_n "checking for $ac_word... " >&6; }
21797if ${ac_cv_path_ZIPEXE+:} false; then :
21798  $as_echo_n "(cached) " >&6
21799else
21800  case $ZIPEXE in
21801  [\\/]* | ?:[\\/]*)
21802  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21803  ;;
21804  *)
21805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21806for as_dir in $PATH
21807do
21808  IFS=$as_save_IFS
21809  test -z "$as_dir" && as_dir=.
21810    for ac_exec_ext in '' $ac_executable_extensions; do
21811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21812    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21814    break 2
21815  fi
21816done
21817  done
21818IFS=$as_save_IFS
21819
21820  ;;
21821esac
21822fi
21823ZIPEXE=$ac_cv_path_ZIPEXE
21824if test -n "$ZIPEXE"; then
21825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21826$as_echo "$ZIPEXE" >&6; }
21827else
21828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21829$as_echo "no" >&6; }
21830fi
21831
21832
21833          if test "x$ZIPEXE" = x; then
21834            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21835          fi
21836        else
21837          # Otherwise we believe it is a complete path. Use it as it is.
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21839$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21841$as_echo_n "checking for ZIPEXE... " >&6; }
21842          if test ! -x "$tool_specified"; then
21843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21844$as_echo "not found" >&6; }
21845            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21846          fi
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21848$as_echo "$tool_specified" >&6; }
21849        fi
21850      fi
21851    fi
21852
21853  fi
21854
21855
21856
21857  if test "x$ZIPEXE" = x; then
21858    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21859  fi
21860
21861
21862
21863  # Non-required basic tools
21864
21865
21866
21867  # Publish this variable in the help.
21868
21869
21870  if [ -z "${LDD+x}" ]; then
21871    # The variable is not set by user, try to locate tool using the code snippet
21872    for ac_prog in ldd
21873do
21874  # Extract the first word of "$ac_prog", so it can be a program name with args.
21875set dummy $ac_prog; ac_word=$2
21876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21877$as_echo_n "checking for $ac_word... " >&6; }
21878if ${ac_cv_path_LDD+:} false; then :
21879  $as_echo_n "(cached) " >&6
21880else
21881  case $LDD in
21882  [\\/]* | ?:[\\/]*)
21883  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21884  ;;
21885  *)
21886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21887for as_dir in $PATH
21888do
21889  IFS=$as_save_IFS
21890  test -z "$as_dir" && as_dir=.
21891    for ac_exec_ext in '' $ac_executable_extensions; do
21892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21893    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21895    break 2
21896  fi
21897done
21898  done
21899IFS=$as_save_IFS
21900
21901  ;;
21902esac
21903fi
21904LDD=$ac_cv_path_LDD
21905if test -n "$LDD"; then
21906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21907$as_echo "$LDD" >&6; }
21908else
21909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21910$as_echo "no" >&6; }
21911fi
21912
21913
21914  test -n "$LDD" && break
21915done
21916
21917  else
21918    # The variable is set, but is it from the command line or the environment?
21919
21920    # Try to remove the string !LDD! from our list.
21921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21923      # If it failed, the variable was not from the command line. Ignore it,
21924      # but warn the user (except for BASH, which is always set by the calling BASH).
21925      if test "xLDD" != xBASH; then
21926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21927$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21928      fi
21929      # Try to locate tool using the code snippet
21930      for ac_prog in ldd
21931do
21932  # Extract the first word of "$ac_prog", so it can be a program name with args.
21933set dummy $ac_prog; ac_word=$2
21934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21935$as_echo_n "checking for $ac_word... " >&6; }
21936if ${ac_cv_path_LDD+:} false; then :
21937  $as_echo_n "(cached) " >&6
21938else
21939  case $LDD in
21940  [\\/]* | ?:[\\/]*)
21941  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21942  ;;
21943  *)
21944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21945for as_dir in $PATH
21946do
21947  IFS=$as_save_IFS
21948  test -z "$as_dir" && as_dir=.
21949    for ac_exec_ext in '' $ac_executable_extensions; do
21950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21951    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21953    break 2
21954  fi
21955done
21956  done
21957IFS=$as_save_IFS
21958
21959  ;;
21960esac
21961fi
21962LDD=$ac_cv_path_LDD
21963if test -n "$LDD"; then
21964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21965$as_echo "$LDD" >&6; }
21966else
21967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21968$as_echo "no" >&6; }
21969fi
21970
21971
21972  test -n "$LDD" && break
21973done
21974
21975    else
21976      # If it succeeded, then it was overridden by the user. We will use it
21977      # for the tool.
21978
21979      # First remove it from the list of overridden variables, so we can test
21980      # for unknown variables in the end.
21981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21982
21983      # Check if we try to supply an empty value
21984      if test "x$LDD" = x; then
21985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21986$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21988$as_echo_n "checking for LDD... " >&6; }
21989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21990$as_echo "disabled" >&6; }
21991      else
21992        # Check if the provided tool contains a complete path.
21993        tool_specified="$LDD"
21994        tool_basename="${tool_specified##*/}"
21995        if test "x$tool_basename" = "x$tool_specified"; then
21996          # A command without a complete path is provided, search $PATH.
21997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21998$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21999          # Extract the first word of "$tool_basename", so it can be a program name with args.
22000set dummy $tool_basename; ac_word=$2
22001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22002$as_echo_n "checking for $ac_word... " >&6; }
22003if ${ac_cv_path_LDD+:} false; then :
22004  $as_echo_n "(cached) " >&6
22005else
22006  case $LDD in
22007  [\\/]* | ?:[\\/]*)
22008  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22009  ;;
22010  *)
22011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22012for as_dir in $PATH
22013do
22014  IFS=$as_save_IFS
22015  test -z "$as_dir" && as_dir=.
22016    for ac_exec_ext in '' $ac_executable_extensions; do
22017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22018    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22020    break 2
22021  fi
22022done
22023  done
22024IFS=$as_save_IFS
22025
22026  ;;
22027esac
22028fi
22029LDD=$ac_cv_path_LDD
22030if test -n "$LDD"; then
22031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22032$as_echo "$LDD" >&6; }
22033else
22034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22035$as_echo "no" >&6; }
22036fi
22037
22038
22039          if test "x$LDD" = x; then
22040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22041          fi
22042        else
22043          # Otherwise we believe it is a complete path. Use it as it is.
22044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22045$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22047$as_echo_n "checking for LDD... " >&6; }
22048          if test ! -x "$tool_specified"; then
22049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22050$as_echo "not found" >&6; }
22051            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22052          fi
22053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22054$as_echo "$tool_specified" >&6; }
22055        fi
22056      fi
22057    fi
22058
22059  fi
22060
22061
22062  if test "x$LDD" = "x"; then
22063    # List shared lib dependencies is used for
22064    # debug output and checking for forbidden dependencies.
22065    # We can build without it.
22066    LDD="true"
22067  fi
22068
22069
22070  # Publish this variable in the help.
22071
22072
22073  if [ -z "${OTOOL+x}" ]; then
22074    # The variable is not set by user, try to locate tool using the code snippet
22075    for ac_prog in otool
22076do
22077  # Extract the first word of "$ac_prog", so it can be a program name with args.
22078set dummy $ac_prog; ac_word=$2
22079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22080$as_echo_n "checking for $ac_word... " >&6; }
22081if ${ac_cv_path_OTOOL+:} false; then :
22082  $as_echo_n "(cached) " >&6
22083else
22084  case $OTOOL in
22085  [\\/]* | ?:[\\/]*)
22086  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22087  ;;
22088  *)
22089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22090for as_dir in $PATH
22091do
22092  IFS=$as_save_IFS
22093  test -z "$as_dir" && as_dir=.
22094    for ac_exec_ext in '' $ac_executable_extensions; do
22095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22096    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22098    break 2
22099  fi
22100done
22101  done
22102IFS=$as_save_IFS
22103
22104  ;;
22105esac
22106fi
22107OTOOL=$ac_cv_path_OTOOL
22108if test -n "$OTOOL"; then
22109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22110$as_echo "$OTOOL" >&6; }
22111else
22112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22113$as_echo "no" >&6; }
22114fi
22115
22116
22117  test -n "$OTOOL" && break
22118done
22119
22120  else
22121    # The variable is set, but is it from the command line or the environment?
22122
22123    # Try to remove the string !OTOOL! from our list.
22124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22126      # If it failed, the variable was not from the command line. Ignore it,
22127      # but warn the user (except for BASH, which is always set by the calling BASH).
22128      if test "xOTOOL" != xBASH; then
22129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22130$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22131      fi
22132      # Try to locate tool using the code snippet
22133      for ac_prog in otool
22134do
22135  # Extract the first word of "$ac_prog", so it can be a program name with args.
22136set dummy $ac_prog; ac_word=$2
22137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22138$as_echo_n "checking for $ac_word... " >&6; }
22139if ${ac_cv_path_OTOOL+:} false; then :
22140  $as_echo_n "(cached) " >&6
22141else
22142  case $OTOOL in
22143  [\\/]* | ?:[\\/]*)
22144  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22145  ;;
22146  *)
22147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22148for as_dir in $PATH
22149do
22150  IFS=$as_save_IFS
22151  test -z "$as_dir" && as_dir=.
22152    for ac_exec_ext in '' $ac_executable_extensions; do
22153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22154    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22156    break 2
22157  fi
22158done
22159  done
22160IFS=$as_save_IFS
22161
22162  ;;
22163esac
22164fi
22165OTOOL=$ac_cv_path_OTOOL
22166if test -n "$OTOOL"; then
22167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22168$as_echo "$OTOOL" >&6; }
22169else
22170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22171$as_echo "no" >&6; }
22172fi
22173
22174
22175  test -n "$OTOOL" && break
22176done
22177
22178    else
22179      # If it succeeded, then it was overridden by the user. We will use it
22180      # for the tool.
22181
22182      # First remove it from the list of overridden variables, so we can test
22183      # for unknown variables in the end.
22184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22185
22186      # Check if we try to supply an empty value
22187      if test "x$OTOOL" = x; then
22188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22189$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22191$as_echo_n "checking for OTOOL... " >&6; }
22192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22193$as_echo "disabled" >&6; }
22194      else
22195        # Check if the provided tool contains a complete path.
22196        tool_specified="$OTOOL"
22197        tool_basename="${tool_specified##*/}"
22198        if test "x$tool_basename" = "x$tool_specified"; then
22199          # A command without a complete path is provided, search $PATH.
22200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22201$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22202          # Extract the first word of "$tool_basename", so it can be a program name with args.
22203set dummy $tool_basename; ac_word=$2
22204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22205$as_echo_n "checking for $ac_word... " >&6; }
22206if ${ac_cv_path_OTOOL+:} false; then :
22207  $as_echo_n "(cached) " >&6
22208else
22209  case $OTOOL in
22210  [\\/]* | ?:[\\/]*)
22211  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22212  ;;
22213  *)
22214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22215for as_dir in $PATH
22216do
22217  IFS=$as_save_IFS
22218  test -z "$as_dir" && as_dir=.
22219    for ac_exec_ext in '' $ac_executable_extensions; do
22220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22221    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22223    break 2
22224  fi
22225done
22226  done
22227IFS=$as_save_IFS
22228
22229  ;;
22230esac
22231fi
22232OTOOL=$ac_cv_path_OTOOL
22233if test -n "$OTOOL"; then
22234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22235$as_echo "$OTOOL" >&6; }
22236else
22237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22238$as_echo "no" >&6; }
22239fi
22240
22241
22242          if test "x$OTOOL" = x; then
22243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22244          fi
22245        else
22246          # Otherwise we believe it is a complete path. Use it as it is.
22247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22248$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22250$as_echo_n "checking for OTOOL... " >&6; }
22251          if test ! -x "$tool_specified"; then
22252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22253$as_echo "not found" >&6; }
22254            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22255          fi
22256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22257$as_echo "$tool_specified" >&6; }
22258        fi
22259      fi
22260    fi
22261
22262  fi
22263
22264
22265  if test "x$OTOOL" = "x"; then
22266    OTOOL="true"
22267  fi
22268
22269
22270  # Publish this variable in the help.
22271
22272
22273  if [ -z "${READELF+x}" ]; then
22274    # The variable is not set by user, try to locate tool using the code snippet
22275    for ac_prog in greadelf readelf
22276do
22277  # Extract the first word of "$ac_prog", so it can be a program name with args.
22278set dummy $ac_prog; ac_word=$2
22279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22280$as_echo_n "checking for $ac_word... " >&6; }
22281if ${ac_cv_path_READELF+:} false; then :
22282  $as_echo_n "(cached) " >&6
22283else
22284  case $READELF in
22285  [\\/]* | ?:[\\/]*)
22286  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22287  ;;
22288  *)
22289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22290for as_dir in $PATH
22291do
22292  IFS=$as_save_IFS
22293  test -z "$as_dir" && as_dir=.
22294    for ac_exec_ext in '' $ac_executable_extensions; do
22295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22296    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22298    break 2
22299  fi
22300done
22301  done
22302IFS=$as_save_IFS
22303
22304  ;;
22305esac
22306fi
22307READELF=$ac_cv_path_READELF
22308if test -n "$READELF"; then
22309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22310$as_echo "$READELF" >&6; }
22311else
22312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22313$as_echo "no" >&6; }
22314fi
22315
22316
22317  test -n "$READELF" && break
22318done
22319
22320  else
22321    # The variable is set, but is it from the command line or the environment?
22322
22323    # Try to remove the string !READELF! from our list.
22324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22326      # If it failed, the variable was not from the command line. Ignore it,
22327      # but warn the user (except for BASH, which is always set by the calling BASH).
22328      if test "xREADELF" != xBASH; then
22329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22330$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22331      fi
22332      # Try to locate tool using the code snippet
22333      for ac_prog in greadelf readelf
22334do
22335  # Extract the first word of "$ac_prog", so it can be a program name with args.
22336set dummy $ac_prog; ac_word=$2
22337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22338$as_echo_n "checking for $ac_word... " >&6; }
22339if ${ac_cv_path_READELF+:} false; then :
22340  $as_echo_n "(cached) " >&6
22341else
22342  case $READELF in
22343  [\\/]* | ?:[\\/]*)
22344  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22345  ;;
22346  *)
22347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22348for as_dir in $PATH
22349do
22350  IFS=$as_save_IFS
22351  test -z "$as_dir" && as_dir=.
22352    for ac_exec_ext in '' $ac_executable_extensions; do
22353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22354    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22356    break 2
22357  fi
22358done
22359  done
22360IFS=$as_save_IFS
22361
22362  ;;
22363esac
22364fi
22365READELF=$ac_cv_path_READELF
22366if test -n "$READELF"; then
22367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22368$as_echo "$READELF" >&6; }
22369else
22370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22371$as_echo "no" >&6; }
22372fi
22373
22374
22375  test -n "$READELF" && break
22376done
22377
22378    else
22379      # If it succeeded, then it was overridden by the user. We will use it
22380      # for the tool.
22381
22382      # First remove it from the list of overridden variables, so we can test
22383      # for unknown variables in the end.
22384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22385
22386      # Check if we try to supply an empty value
22387      if test "x$READELF" = x; then
22388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22389$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22391$as_echo_n "checking for READELF... " >&6; }
22392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22393$as_echo "disabled" >&6; }
22394      else
22395        # Check if the provided tool contains a complete path.
22396        tool_specified="$READELF"
22397        tool_basename="${tool_specified##*/}"
22398        if test "x$tool_basename" = "x$tool_specified"; then
22399          # A command without a complete path is provided, search $PATH.
22400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22401$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22402          # Extract the first word of "$tool_basename", so it can be a program name with args.
22403set dummy $tool_basename; ac_word=$2
22404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22405$as_echo_n "checking for $ac_word... " >&6; }
22406if ${ac_cv_path_READELF+:} false; then :
22407  $as_echo_n "(cached) " >&6
22408else
22409  case $READELF in
22410  [\\/]* | ?:[\\/]*)
22411  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22412  ;;
22413  *)
22414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22415for as_dir in $PATH
22416do
22417  IFS=$as_save_IFS
22418  test -z "$as_dir" && as_dir=.
22419    for ac_exec_ext in '' $ac_executable_extensions; do
22420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22421    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22423    break 2
22424  fi
22425done
22426  done
22427IFS=$as_save_IFS
22428
22429  ;;
22430esac
22431fi
22432READELF=$ac_cv_path_READELF
22433if test -n "$READELF"; then
22434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22435$as_echo "$READELF" >&6; }
22436else
22437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22438$as_echo "no" >&6; }
22439fi
22440
22441
22442          if test "x$READELF" = x; then
22443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22444          fi
22445        else
22446          # Otherwise we believe it is a complete path. Use it as it is.
22447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22448$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22450$as_echo_n "checking for READELF... " >&6; }
22451          if test ! -x "$tool_specified"; then
22452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22453$as_echo "not found" >&6; }
22454            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22455          fi
22456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22457$as_echo "$tool_specified" >&6; }
22458        fi
22459      fi
22460    fi
22461
22462  fi
22463
22464
22465
22466
22467  # Publish this variable in the help.
22468
22469
22470  if [ -z "${DOT+x}" ]; then
22471    # The variable is not set by user, try to locate tool using the code snippet
22472    for ac_prog in dot
22473do
22474  # Extract the first word of "$ac_prog", so it can be a program name with args.
22475set dummy $ac_prog; ac_word=$2
22476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22477$as_echo_n "checking for $ac_word... " >&6; }
22478if ${ac_cv_path_DOT+:} false; then :
22479  $as_echo_n "(cached) " >&6
22480else
22481  case $DOT in
22482  [\\/]* | ?:[\\/]*)
22483  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22484  ;;
22485  *)
22486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22487for as_dir in $PATH
22488do
22489  IFS=$as_save_IFS
22490  test -z "$as_dir" && as_dir=.
22491    for ac_exec_ext in '' $ac_executable_extensions; do
22492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22493    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22495    break 2
22496  fi
22497done
22498  done
22499IFS=$as_save_IFS
22500
22501  ;;
22502esac
22503fi
22504DOT=$ac_cv_path_DOT
22505if test -n "$DOT"; then
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22507$as_echo "$DOT" >&6; }
22508else
22509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22510$as_echo "no" >&6; }
22511fi
22512
22513
22514  test -n "$DOT" && break
22515done
22516
22517  else
22518    # The variable is set, but is it from the command line or the environment?
22519
22520    # Try to remove the string !DOT! from our list.
22521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22523      # If it failed, the variable was not from the command line. Ignore it,
22524      # but warn the user (except for BASH, which is always set by the calling BASH).
22525      if test "xDOT" != xBASH; then
22526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22527$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22528      fi
22529      # Try to locate tool using the code snippet
22530      for ac_prog in dot
22531do
22532  # Extract the first word of "$ac_prog", so it can be a program name with args.
22533set dummy $ac_prog; ac_word=$2
22534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22535$as_echo_n "checking for $ac_word... " >&6; }
22536if ${ac_cv_path_DOT+:} false; then :
22537  $as_echo_n "(cached) " >&6
22538else
22539  case $DOT in
22540  [\\/]* | ?:[\\/]*)
22541  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22542  ;;
22543  *)
22544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22545for as_dir in $PATH
22546do
22547  IFS=$as_save_IFS
22548  test -z "$as_dir" && as_dir=.
22549    for ac_exec_ext in '' $ac_executable_extensions; do
22550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22551    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22553    break 2
22554  fi
22555done
22556  done
22557IFS=$as_save_IFS
22558
22559  ;;
22560esac
22561fi
22562DOT=$ac_cv_path_DOT
22563if test -n "$DOT"; then
22564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22565$as_echo "$DOT" >&6; }
22566else
22567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22568$as_echo "no" >&6; }
22569fi
22570
22571
22572  test -n "$DOT" && break
22573done
22574
22575    else
22576      # If it succeeded, then it was overridden by the user. We will use it
22577      # for the tool.
22578
22579      # First remove it from the list of overridden variables, so we can test
22580      # for unknown variables in the end.
22581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22582
22583      # Check if we try to supply an empty value
22584      if test "x$DOT" = x; then
22585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22586$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22588$as_echo_n "checking for DOT... " >&6; }
22589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22590$as_echo "disabled" >&6; }
22591      else
22592        # Check if the provided tool contains a complete path.
22593        tool_specified="$DOT"
22594        tool_basename="${tool_specified##*/}"
22595        if test "x$tool_basename" = "x$tool_specified"; then
22596          # A command without a complete path is provided, search $PATH.
22597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22598$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22599          # Extract the first word of "$tool_basename", so it can be a program name with args.
22600set dummy $tool_basename; ac_word=$2
22601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22602$as_echo_n "checking for $ac_word... " >&6; }
22603if ${ac_cv_path_DOT+:} false; then :
22604  $as_echo_n "(cached) " >&6
22605else
22606  case $DOT in
22607  [\\/]* | ?:[\\/]*)
22608  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22609  ;;
22610  *)
22611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22612for as_dir in $PATH
22613do
22614  IFS=$as_save_IFS
22615  test -z "$as_dir" && as_dir=.
22616    for ac_exec_ext in '' $ac_executable_extensions; do
22617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22618    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22620    break 2
22621  fi
22622done
22623  done
22624IFS=$as_save_IFS
22625
22626  ;;
22627esac
22628fi
22629DOT=$ac_cv_path_DOT
22630if test -n "$DOT"; then
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22632$as_echo "$DOT" >&6; }
22633else
22634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22635$as_echo "no" >&6; }
22636fi
22637
22638
22639          if test "x$DOT" = x; then
22640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22641          fi
22642        else
22643          # Otherwise we believe it is a complete path. Use it as it is.
22644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22645$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22647$as_echo_n "checking for DOT... " >&6; }
22648          if test ! -x "$tool_specified"; then
22649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22650$as_echo "not found" >&6; }
22651            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22652          fi
22653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22654$as_echo "$tool_specified" >&6; }
22655        fi
22656      fi
22657    fi
22658
22659  fi
22660
22661
22662
22663
22664  # Publish this variable in the help.
22665
22666
22667  if [ -z "${HG+x}" ]; then
22668    # The variable is not set by user, try to locate tool using the code snippet
22669    for ac_prog in hg
22670do
22671  # Extract the first word of "$ac_prog", so it can be a program name with args.
22672set dummy $ac_prog; ac_word=$2
22673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22674$as_echo_n "checking for $ac_word... " >&6; }
22675if ${ac_cv_path_HG+:} false; then :
22676  $as_echo_n "(cached) " >&6
22677else
22678  case $HG in
22679  [\\/]* | ?:[\\/]*)
22680  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22681  ;;
22682  *)
22683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22684for as_dir in $PATH
22685do
22686  IFS=$as_save_IFS
22687  test -z "$as_dir" && as_dir=.
22688    for ac_exec_ext in '' $ac_executable_extensions; do
22689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22690    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22692    break 2
22693  fi
22694done
22695  done
22696IFS=$as_save_IFS
22697
22698  ;;
22699esac
22700fi
22701HG=$ac_cv_path_HG
22702if test -n "$HG"; then
22703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22704$as_echo "$HG" >&6; }
22705else
22706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22707$as_echo "no" >&6; }
22708fi
22709
22710
22711  test -n "$HG" && break
22712done
22713
22714  else
22715    # The variable is set, but is it from the command line or the environment?
22716
22717    # Try to remove the string !HG! from our list.
22718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22720      # If it failed, the variable was not from the command line. Ignore it,
22721      # but warn the user (except for BASH, which is always set by the calling BASH).
22722      if test "xHG" != xBASH; then
22723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22724$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22725      fi
22726      # Try to locate tool using the code snippet
22727      for ac_prog in hg
22728do
22729  # Extract the first word of "$ac_prog", so it can be a program name with args.
22730set dummy $ac_prog; ac_word=$2
22731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22732$as_echo_n "checking for $ac_word... " >&6; }
22733if ${ac_cv_path_HG+:} false; then :
22734  $as_echo_n "(cached) " >&6
22735else
22736  case $HG in
22737  [\\/]* | ?:[\\/]*)
22738  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22739  ;;
22740  *)
22741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22742for as_dir in $PATH
22743do
22744  IFS=$as_save_IFS
22745  test -z "$as_dir" && as_dir=.
22746    for ac_exec_ext in '' $ac_executable_extensions; do
22747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22748    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22750    break 2
22751  fi
22752done
22753  done
22754IFS=$as_save_IFS
22755
22756  ;;
22757esac
22758fi
22759HG=$ac_cv_path_HG
22760if test -n "$HG"; then
22761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22762$as_echo "$HG" >&6; }
22763else
22764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22765$as_echo "no" >&6; }
22766fi
22767
22768
22769  test -n "$HG" && break
22770done
22771
22772    else
22773      # If it succeeded, then it was overridden by the user. We will use it
22774      # for the tool.
22775
22776      # First remove it from the list of overridden variables, so we can test
22777      # for unknown variables in the end.
22778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22779
22780      # Check if we try to supply an empty value
22781      if test "x$HG" = x; then
22782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22783$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22785$as_echo_n "checking for HG... " >&6; }
22786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22787$as_echo "disabled" >&6; }
22788      else
22789        # Check if the provided tool contains a complete path.
22790        tool_specified="$HG"
22791        tool_basename="${tool_specified##*/}"
22792        if test "x$tool_basename" = "x$tool_specified"; then
22793          # A command without a complete path is provided, search $PATH.
22794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22795$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22796          # Extract the first word of "$tool_basename", so it can be a program name with args.
22797set dummy $tool_basename; ac_word=$2
22798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22799$as_echo_n "checking for $ac_word... " >&6; }
22800if ${ac_cv_path_HG+:} false; then :
22801  $as_echo_n "(cached) " >&6
22802else
22803  case $HG in
22804  [\\/]* | ?:[\\/]*)
22805  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22806  ;;
22807  *)
22808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22809for as_dir in $PATH
22810do
22811  IFS=$as_save_IFS
22812  test -z "$as_dir" && as_dir=.
22813    for ac_exec_ext in '' $ac_executable_extensions; do
22814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22815    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22817    break 2
22818  fi
22819done
22820  done
22821IFS=$as_save_IFS
22822
22823  ;;
22824esac
22825fi
22826HG=$ac_cv_path_HG
22827if test -n "$HG"; then
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22829$as_echo "$HG" >&6; }
22830else
22831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22832$as_echo "no" >&6; }
22833fi
22834
22835
22836          if test "x$HG" = x; then
22837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22838          fi
22839        else
22840          # Otherwise we believe it is a complete path. Use it as it is.
22841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22842$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22844$as_echo_n "checking for HG... " >&6; }
22845          if test ! -x "$tool_specified"; then
22846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22847$as_echo "not found" >&6; }
22848            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22849          fi
22850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22851$as_echo "$tool_specified" >&6; }
22852        fi
22853      fi
22854    fi
22855
22856  fi
22857
22858
22859
22860
22861  # Publish this variable in the help.
22862
22863
22864  if [ -z "${STAT+x}" ]; then
22865    # The variable is not set by user, try to locate tool using the code snippet
22866    for ac_prog in stat
22867do
22868  # Extract the first word of "$ac_prog", so it can be a program name with args.
22869set dummy $ac_prog; ac_word=$2
22870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22871$as_echo_n "checking for $ac_word... " >&6; }
22872if ${ac_cv_path_STAT+:} false; then :
22873  $as_echo_n "(cached) " >&6
22874else
22875  case $STAT in
22876  [\\/]* | ?:[\\/]*)
22877  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22878  ;;
22879  *)
22880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22881for as_dir in $PATH
22882do
22883  IFS=$as_save_IFS
22884  test -z "$as_dir" && as_dir=.
22885    for ac_exec_ext in '' $ac_executable_extensions; do
22886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22887    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22889    break 2
22890  fi
22891done
22892  done
22893IFS=$as_save_IFS
22894
22895  ;;
22896esac
22897fi
22898STAT=$ac_cv_path_STAT
22899if test -n "$STAT"; then
22900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22901$as_echo "$STAT" >&6; }
22902else
22903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22904$as_echo "no" >&6; }
22905fi
22906
22907
22908  test -n "$STAT" && break
22909done
22910
22911  else
22912    # The variable is set, but is it from the command line or the environment?
22913
22914    # Try to remove the string !STAT! from our list.
22915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22917      # If it failed, the variable was not from the command line. Ignore it,
22918      # but warn the user (except for BASH, which is always set by the calling BASH).
22919      if test "xSTAT" != xBASH; then
22920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22921$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22922      fi
22923      # Try to locate tool using the code snippet
22924      for ac_prog in stat
22925do
22926  # Extract the first word of "$ac_prog", so it can be a program name with args.
22927set dummy $ac_prog; ac_word=$2
22928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22929$as_echo_n "checking for $ac_word... " >&6; }
22930if ${ac_cv_path_STAT+:} false; then :
22931  $as_echo_n "(cached) " >&6
22932else
22933  case $STAT in
22934  [\\/]* | ?:[\\/]*)
22935  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22936  ;;
22937  *)
22938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22939for as_dir in $PATH
22940do
22941  IFS=$as_save_IFS
22942  test -z "$as_dir" && as_dir=.
22943    for ac_exec_ext in '' $ac_executable_extensions; do
22944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22945    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22947    break 2
22948  fi
22949done
22950  done
22951IFS=$as_save_IFS
22952
22953  ;;
22954esac
22955fi
22956STAT=$ac_cv_path_STAT
22957if test -n "$STAT"; then
22958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22959$as_echo "$STAT" >&6; }
22960else
22961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22962$as_echo "no" >&6; }
22963fi
22964
22965
22966  test -n "$STAT" && break
22967done
22968
22969    else
22970      # If it succeeded, then it was overridden by the user. We will use it
22971      # for the tool.
22972
22973      # First remove it from the list of overridden variables, so we can test
22974      # for unknown variables in the end.
22975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22976
22977      # Check if we try to supply an empty value
22978      if test "x$STAT" = x; then
22979        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22980$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22982$as_echo_n "checking for STAT... " >&6; }
22983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22984$as_echo "disabled" >&6; }
22985      else
22986        # Check if the provided tool contains a complete path.
22987        tool_specified="$STAT"
22988        tool_basename="${tool_specified##*/}"
22989        if test "x$tool_basename" = "x$tool_specified"; then
22990          # A command without a complete path is provided, search $PATH.
22991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22992$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22993          # Extract the first word of "$tool_basename", so it can be a program name with args.
22994set dummy $tool_basename; ac_word=$2
22995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22996$as_echo_n "checking for $ac_word... " >&6; }
22997if ${ac_cv_path_STAT+:} false; then :
22998  $as_echo_n "(cached) " >&6
22999else
23000  case $STAT in
23001  [\\/]* | ?:[\\/]*)
23002  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23003  ;;
23004  *)
23005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23006for as_dir in $PATH
23007do
23008  IFS=$as_save_IFS
23009  test -z "$as_dir" && as_dir=.
23010    for ac_exec_ext in '' $ac_executable_extensions; do
23011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23012    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23014    break 2
23015  fi
23016done
23017  done
23018IFS=$as_save_IFS
23019
23020  ;;
23021esac
23022fi
23023STAT=$ac_cv_path_STAT
23024if test -n "$STAT"; then
23025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23026$as_echo "$STAT" >&6; }
23027else
23028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23029$as_echo "no" >&6; }
23030fi
23031
23032
23033          if test "x$STAT" = x; then
23034            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23035          fi
23036        else
23037          # Otherwise we believe it is a complete path. Use it as it is.
23038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23039$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23040          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23041$as_echo_n "checking for STAT... " >&6; }
23042          if test ! -x "$tool_specified"; then
23043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23044$as_echo "not found" >&6; }
23045            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23046          fi
23047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23048$as_echo "$tool_specified" >&6; }
23049        fi
23050      fi
23051    fi
23052
23053  fi
23054
23055
23056
23057
23058  # Publish this variable in the help.
23059
23060
23061  if [ -z "${TIME+x}" ]; then
23062    # The variable is not set by user, try to locate tool using the code snippet
23063    for ac_prog in time
23064do
23065  # Extract the first word of "$ac_prog", so it can be a program name with args.
23066set dummy $ac_prog; ac_word=$2
23067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23068$as_echo_n "checking for $ac_word... " >&6; }
23069if ${ac_cv_path_TIME+:} false; then :
23070  $as_echo_n "(cached) " >&6
23071else
23072  case $TIME in
23073  [\\/]* | ?:[\\/]*)
23074  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23075  ;;
23076  *)
23077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23078for as_dir in $PATH
23079do
23080  IFS=$as_save_IFS
23081  test -z "$as_dir" && as_dir=.
23082    for ac_exec_ext in '' $ac_executable_extensions; do
23083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23084    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23086    break 2
23087  fi
23088done
23089  done
23090IFS=$as_save_IFS
23091
23092  ;;
23093esac
23094fi
23095TIME=$ac_cv_path_TIME
23096if test -n "$TIME"; then
23097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23098$as_echo "$TIME" >&6; }
23099else
23100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23101$as_echo "no" >&6; }
23102fi
23103
23104
23105  test -n "$TIME" && break
23106done
23107
23108  else
23109    # The variable is set, but is it from the command line or the environment?
23110
23111    # Try to remove the string !TIME! from our list.
23112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23114      # If it failed, the variable was not from the command line. Ignore it,
23115      # but warn the user (except for BASH, which is always set by the calling BASH).
23116      if test "xTIME" != xBASH; then
23117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23118$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23119      fi
23120      # Try to locate tool using the code snippet
23121      for ac_prog in time
23122do
23123  # Extract the first word of "$ac_prog", so it can be a program name with args.
23124set dummy $ac_prog; ac_word=$2
23125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23126$as_echo_n "checking for $ac_word... " >&6; }
23127if ${ac_cv_path_TIME+:} false; then :
23128  $as_echo_n "(cached) " >&6
23129else
23130  case $TIME in
23131  [\\/]* | ?:[\\/]*)
23132  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23133  ;;
23134  *)
23135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23136for as_dir in $PATH
23137do
23138  IFS=$as_save_IFS
23139  test -z "$as_dir" && as_dir=.
23140    for ac_exec_ext in '' $ac_executable_extensions; do
23141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23142    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23144    break 2
23145  fi
23146done
23147  done
23148IFS=$as_save_IFS
23149
23150  ;;
23151esac
23152fi
23153TIME=$ac_cv_path_TIME
23154if test -n "$TIME"; then
23155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23156$as_echo "$TIME" >&6; }
23157else
23158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23159$as_echo "no" >&6; }
23160fi
23161
23162
23163  test -n "$TIME" && break
23164done
23165
23166    else
23167      # If it succeeded, then it was overridden by the user. We will use it
23168      # for the tool.
23169
23170      # First remove it from the list of overridden variables, so we can test
23171      # for unknown variables in the end.
23172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23173
23174      # Check if we try to supply an empty value
23175      if test "x$TIME" = x; then
23176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23177$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23179$as_echo_n "checking for TIME... " >&6; }
23180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23181$as_echo "disabled" >&6; }
23182      else
23183        # Check if the provided tool contains a complete path.
23184        tool_specified="$TIME"
23185        tool_basename="${tool_specified##*/}"
23186        if test "x$tool_basename" = "x$tool_specified"; then
23187          # A command without a complete path is provided, search $PATH.
23188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23189$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23190          # Extract the first word of "$tool_basename", so it can be a program name with args.
23191set dummy $tool_basename; 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_TIME+:} false; then :
23195  $as_echo_n "(cached) " >&6
23196else
23197  case $TIME in
23198  [\\/]* | ?:[\\/]*)
23199  ac_cv_path_TIME="$TIME" # 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_TIME="$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
23220TIME=$ac_cv_path_TIME
23221if test -n "$TIME"; then
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23223$as_echo "$TIME" >&6; }
23224else
23225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23226$as_echo "no" >&6; }
23227fi
23228
23229
23230          if test "x$TIME" = x; then
23231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23232          fi
23233        else
23234          # Otherwise we believe it is a complete path. Use it as it is.
23235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23236$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23238$as_echo_n "checking for TIME... " >&6; }
23239          if test ! -x "$tool_specified"; then
23240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23241$as_echo "not found" >&6; }
23242            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23243          fi
23244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23245$as_echo "$tool_specified" >&6; }
23246        fi
23247      fi
23248    fi
23249
23250  fi
23251
23252
23253
23254
23255  # Publish this variable in the help.
23256
23257
23258  if [ -z "${FLOCK+x}" ]; then
23259    # The variable is not set by user, try to locate tool using the code snippet
23260    for ac_prog in flock
23261do
23262  # Extract the first word of "$ac_prog", so it can be a program name with args.
23263set dummy $ac_prog; ac_word=$2
23264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23265$as_echo_n "checking for $ac_word... " >&6; }
23266if ${ac_cv_path_FLOCK+:} false; then :
23267  $as_echo_n "(cached) " >&6
23268else
23269  case $FLOCK in
23270  [\\/]* | ?:[\\/]*)
23271  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23272  ;;
23273  *)
23274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23275for as_dir in $PATH
23276do
23277  IFS=$as_save_IFS
23278  test -z "$as_dir" && as_dir=.
23279    for ac_exec_ext in '' $ac_executable_extensions; do
23280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23281    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23283    break 2
23284  fi
23285done
23286  done
23287IFS=$as_save_IFS
23288
23289  ;;
23290esac
23291fi
23292FLOCK=$ac_cv_path_FLOCK
23293if test -n "$FLOCK"; then
23294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23295$as_echo "$FLOCK" >&6; }
23296else
23297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23298$as_echo "no" >&6; }
23299fi
23300
23301
23302  test -n "$FLOCK" && break
23303done
23304
23305  else
23306    # The variable is set, but is it from the command line or the environment?
23307
23308    # Try to remove the string !FLOCK! from our list.
23309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23311      # If it failed, the variable was not from the command line. Ignore it,
23312      # but warn the user (except for BASH, which is always set by the calling BASH).
23313      if test "xFLOCK" != xBASH; then
23314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23315$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23316      fi
23317      # Try to locate tool using the code snippet
23318      for ac_prog in flock
23319do
23320  # Extract the first word of "$ac_prog", so it can be a program name with args.
23321set dummy $ac_prog; ac_word=$2
23322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23323$as_echo_n "checking for $ac_word... " >&6; }
23324if ${ac_cv_path_FLOCK+:} false; then :
23325  $as_echo_n "(cached) " >&6
23326else
23327  case $FLOCK in
23328  [\\/]* | ?:[\\/]*)
23329  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23330  ;;
23331  *)
23332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23333for as_dir in $PATH
23334do
23335  IFS=$as_save_IFS
23336  test -z "$as_dir" && as_dir=.
23337    for ac_exec_ext in '' $ac_executable_extensions; do
23338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23339    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23341    break 2
23342  fi
23343done
23344  done
23345IFS=$as_save_IFS
23346
23347  ;;
23348esac
23349fi
23350FLOCK=$ac_cv_path_FLOCK
23351if test -n "$FLOCK"; then
23352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23353$as_echo "$FLOCK" >&6; }
23354else
23355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23356$as_echo "no" >&6; }
23357fi
23358
23359
23360  test -n "$FLOCK" && break
23361done
23362
23363    else
23364      # If it succeeded, then it was overridden by the user. We will use it
23365      # for the tool.
23366
23367      # First remove it from the list of overridden variables, so we can test
23368      # for unknown variables in the end.
23369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23370
23371      # Check if we try to supply an empty value
23372      if test "x$FLOCK" = x; then
23373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23374$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23376$as_echo_n "checking for FLOCK... " >&6; }
23377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23378$as_echo "disabled" >&6; }
23379      else
23380        # Check if the provided tool contains a complete path.
23381        tool_specified="$FLOCK"
23382        tool_basename="${tool_specified##*/}"
23383        if test "x$tool_basename" = "x$tool_specified"; then
23384          # A command without a complete path is provided, search $PATH.
23385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23386$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23387          # Extract the first word of "$tool_basename", so it can be a program name with args.
23388set dummy $tool_basename; ac_word=$2
23389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23390$as_echo_n "checking for $ac_word... " >&6; }
23391if ${ac_cv_path_FLOCK+:} false; then :
23392  $as_echo_n "(cached) " >&6
23393else
23394  case $FLOCK in
23395  [\\/]* | ?:[\\/]*)
23396  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23397  ;;
23398  *)
23399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23400for as_dir in $PATH
23401do
23402  IFS=$as_save_IFS
23403  test -z "$as_dir" && as_dir=.
23404    for ac_exec_ext in '' $ac_executable_extensions; do
23405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23406    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23408    break 2
23409  fi
23410done
23411  done
23412IFS=$as_save_IFS
23413
23414  ;;
23415esac
23416fi
23417FLOCK=$ac_cv_path_FLOCK
23418if test -n "$FLOCK"; then
23419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23420$as_echo "$FLOCK" >&6; }
23421else
23422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23423$as_echo "no" >&6; }
23424fi
23425
23426
23427          if test "x$FLOCK" = x; then
23428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23429          fi
23430        else
23431          # Otherwise we believe it is a complete path. Use it as it is.
23432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23433$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23435$as_echo_n "checking for FLOCK... " >&6; }
23436          if test ! -x "$tool_specified"; then
23437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23438$as_echo "not found" >&6; }
23439            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23440          fi
23441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23442$as_echo "$tool_specified" >&6; }
23443        fi
23444      fi
23445    fi
23446
23447  fi
23448
23449
23450  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23451  # be in the user path.
23452
23453
23454  # Publish this variable in the help.
23455
23456
23457  if [ -z "${DTRACE+x}" ]; then
23458    # The variable is not set by user, try to locate tool using the code snippet
23459    for ac_prog in dtrace
23460do
23461  # Extract the first word of "$ac_prog", so it can be a program name with args.
23462set dummy $ac_prog; ac_word=$2
23463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23464$as_echo_n "checking for $ac_word... " >&6; }
23465if ${ac_cv_path_DTRACE+:} false; then :
23466  $as_echo_n "(cached) " >&6
23467else
23468  case $DTRACE in
23469  [\\/]* | ?:[\\/]*)
23470  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23471  ;;
23472  *)
23473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23474as_dummy="$PATH:/usr/sbin"
23475for as_dir in $as_dummy
23476do
23477  IFS=$as_save_IFS
23478  test -z "$as_dir" && as_dir=.
23479    for ac_exec_ext in '' $ac_executable_extensions; do
23480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23481    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23483    break 2
23484  fi
23485done
23486  done
23487IFS=$as_save_IFS
23488
23489  ;;
23490esac
23491fi
23492DTRACE=$ac_cv_path_DTRACE
23493if test -n "$DTRACE"; then
23494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23495$as_echo "$DTRACE" >&6; }
23496else
23497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23498$as_echo "no" >&6; }
23499fi
23500
23501
23502  test -n "$DTRACE" && break
23503done
23504
23505  else
23506    # The variable is set, but is it from the command line or the environment?
23507
23508    # Try to remove the string !DTRACE! from our list.
23509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23511      # If it failed, the variable was not from the command line. Ignore it,
23512      # but warn the user (except for BASH, which is always set by the calling BASH).
23513      if test "xDTRACE" != xBASH; then
23514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23515$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23516      fi
23517      # Try to locate tool using the code snippet
23518      for ac_prog in dtrace
23519do
23520  # Extract the first word of "$ac_prog", so it can be a program name with args.
23521set dummy $ac_prog; ac_word=$2
23522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23523$as_echo_n "checking for $ac_word... " >&6; }
23524if ${ac_cv_path_DTRACE+:} false; then :
23525  $as_echo_n "(cached) " >&6
23526else
23527  case $DTRACE in
23528  [\\/]* | ?:[\\/]*)
23529  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23530  ;;
23531  *)
23532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23533as_dummy="$PATH:/usr/sbin"
23534for as_dir in $as_dummy
23535do
23536  IFS=$as_save_IFS
23537  test -z "$as_dir" && as_dir=.
23538    for ac_exec_ext in '' $ac_executable_extensions; do
23539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23540    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23542    break 2
23543  fi
23544done
23545  done
23546IFS=$as_save_IFS
23547
23548  ;;
23549esac
23550fi
23551DTRACE=$ac_cv_path_DTRACE
23552if test -n "$DTRACE"; then
23553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23554$as_echo "$DTRACE" >&6; }
23555else
23556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23557$as_echo "no" >&6; }
23558fi
23559
23560
23561  test -n "$DTRACE" && break
23562done
23563
23564    else
23565      # If it succeeded, then it was overridden by the user. We will use it
23566      # for the tool.
23567
23568      # First remove it from the list of overridden variables, so we can test
23569      # for unknown variables in the end.
23570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23571
23572      # Check if we try to supply an empty value
23573      if test "x$DTRACE" = x; then
23574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23575$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23577$as_echo_n "checking for DTRACE... " >&6; }
23578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23579$as_echo "disabled" >&6; }
23580      else
23581        # Check if the provided tool contains a complete path.
23582        tool_specified="$DTRACE"
23583        tool_basename="${tool_specified##*/}"
23584        if test "x$tool_basename" = "x$tool_specified"; then
23585          # A command without a complete path is provided, search $PATH.
23586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23587$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23588          # Extract the first word of "$tool_basename", so it can be a program name with args.
23589set dummy $tool_basename; ac_word=$2
23590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23591$as_echo_n "checking for $ac_word... " >&6; }
23592if ${ac_cv_path_DTRACE+:} false; then :
23593  $as_echo_n "(cached) " >&6
23594else
23595  case $DTRACE in
23596  [\\/]* | ?:[\\/]*)
23597  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23598  ;;
23599  *)
23600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23601for as_dir in $PATH
23602do
23603  IFS=$as_save_IFS
23604  test -z "$as_dir" && as_dir=.
23605    for ac_exec_ext in '' $ac_executable_extensions; do
23606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23607    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23609    break 2
23610  fi
23611done
23612  done
23613IFS=$as_save_IFS
23614
23615  ;;
23616esac
23617fi
23618DTRACE=$ac_cv_path_DTRACE
23619if test -n "$DTRACE"; then
23620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23621$as_echo "$DTRACE" >&6; }
23622else
23623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23624$as_echo "no" >&6; }
23625fi
23626
23627
23628          if test "x$DTRACE" = x; then
23629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23630          fi
23631        else
23632          # Otherwise we believe it is a complete path. Use it as it is.
23633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23634$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23636$as_echo_n "checking for DTRACE... " >&6; }
23637          if test ! -x "$tool_specified"; then
23638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23639$as_echo "not found" >&6; }
23640            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23641          fi
23642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23643$as_echo "$tool_specified" >&6; }
23644        fi
23645      fi
23646    fi
23647
23648  fi
23649
23650
23651
23652
23653  # Publish this variable in the help.
23654
23655
23656  if [ -z "${PATCH+x}" ]; then
23657    # The variable is not set by user, try to locate tool using the code snippet
23658    for ac_prog in gpatch patch
23659do
23660  # Extract the first word of "$ac_prog", so it can be a program name with args.
23661set dummy $ac_prog; ac_word=$2
23662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23663$as_echo_n "checking for $ac_word... " >&6; }
23664if ${ac_cv_path_PATCH+:} false; then :
23665  $as_echo_n "(cached) " >&6
23666else
23667  case $PATCH in
23668  [\\/]* | ?:[\\/]*)
23669  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23670  ;;
23671  *)
23672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23673for as_dir in $PATH
23674do
23675  IFS=$as_save_IFS
23676  test -z "$as_dir" && as_dir=.
23677    for ac_exec_ext in '' $ac_executable_extensions; do
23678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23679    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23681    break 2
23682  fi
23683done
23684  done
23685IFS=$as_save_IFS
23686
23687  ;;
23688esac
23689fi
23690PATCH=$ac_cv_path_PATCH
23691if test -n "$PATCH"; then
23692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23693$as_echo "$PATCH" >&6; }
23694else
23695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23696$as_echo "no" >&6; }
23697fi
23698
23699
23700  test -n "$PATCH" && break
23701done
23702
23703  else
23704    # The variable is set, but is it from the command line or the environment?
23705
23706    # Try to remove the string !PATCH! from our list.
23707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23709      # If it failed, the variable was not from the command line. Ignore it,
23710      # but warn the user (except for BASH, which is always set by the calling BASH).
23711      if test "xPATCH" != xBASH; then
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23713$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23714      fi
23715      # Try to locate tool using the code snippet
23716      for ac_prog in gpatch patch
23717do
23718  # Extract the first word of "$ac_prog", so it can be a program name with args.
23719set dummy $ac_prog; ac_word=$2
23720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23721$as_echo_n "checking for $ac_word... " >&6; }
23722if ${ac_cv_path_PATCH+:} false; then :
23723  $as_echo_n "(cached) " >&6
23724else
23725  case $PATCH in
23726  [\\/]* | ?:[\\/]*)
23727  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23728  ;;
23729  *)
23730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23731for as_dir in $PATH
23732do
23733  IFS=$as_save_IFS
23734  test -z "$as_dir" && as_dir=.
23735    for ac_exec_ext in '' $ac_executable_extensions; do
23736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23737    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23739    break 2
23740  fi
23741done
23742  done
23743IFS=$as_save_IFS
23744
23745  ;;
23746esac
23747fi
23748PATCH=$ac_cv_path_PATCH
23749if test -n "$PATCH"; then
23750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23751$as_echo "$PATCH" >&6; }
23752else
23753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23754$as_echo "no" >&6; }
23755fi
23756
23757
23758  test -n "$PATCH" && break
23759done
23760
23761    else
23762      # If it succeeded, then it was overridden by the user. We will use it
23763      # for the tool.
23764
23765      # First remove it from the list of overridden variables, so we can test
23766      # for unknown variables in the end.
23767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23768
23769      # Check if we try to supply an empty value
23770      if test "x$PATCH" = x; then
23771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23772$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23774$as_echo_n "checking for PATCH... " >&6; }
23775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23776$as_echo "disabled" >&6; }
23777      else
23778        # Check if the provided tool contains a complete path.
23779        tool_specified="$PATCH"
23780        tool_basename="${tool_specified##*/}"
23781        if test "x$tool_basename" = "x$tool_specified"; then
23782          # A command without a complete path is provided, search $PATH.
23783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23784$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23785          # Extract the first word of "$tool_basename", so it can be a program name with args.
23786set dummy $tool_basename; ac_word=$2
23787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23788$as_echo_n "checking for $ac_word... " >&6; }
23789if ${ac_cv_path_PATCH+:} false; then :
23790  $as_echo_n "(cached) " >&6
23791else
23792  case $PATCH in
23793  [\\/]* | ?:[\\/]*)
23794  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23795  ;;
23796  *)
23797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23798for as_dir in $PATH
23799do
23800  IFS=$as_save_IFS
23801  test -z "$as_dir" && as_dir=.
23802    for ac_exec_ext in '' $ac_executable_extensions; do
23803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23804    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23806    break 2
23807  fi
23808done
23809  done
23810IFS=$as_save_IFS
23811
23812  ;;
23813esac
23814fi
23815PATCH=$ac_cv_path_PATCH
23816if test -n "$PATCH"; then
23817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23818$as_echo "$PATCH" >&6; }
23819else
23820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23821$as_echo "no" >&6; }
23822fi
23823
23824
23825          if test "x$PATCH" = x; then
23826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23827          fi
23828        else
23829          # Otherwise we believe it is a complete path. Use it as it is.
23830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23831$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23833$as_echo_n "checking for PATCH... " >&6; }
23834          if test ! -x "$tool_specified"; then
23835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23836$as_echo "not found" >&6; }
23837            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23838          fi
23839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23840$as_echo "$tool_specified" >&6; }
23841        fi
23842      fi
23843    fi
23844
23845  fi
23846
23847
23848  # Check if it's GNU time
23849  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23850  if test "x$IS_GNU_TIME" != x; then
23851    IS_GNU_TIME=yes
23852  else
23853    IS_GNU_TIME=no
23854  fi
23855
23856
23857  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23858
23859
23860
23861  # Publish this variable in the help.
23862
23863
23864  if [ -z "${DSYMUTIL+x}" ]; then
23865    # The variable is not set by user, try to locate tool using the code snippet
23866    for ac_prog in dsymutil
23867do
23868  # Extract the first word of "$ac_prog", so it can be a program name with args.
23869set dummy $ac_prog; ac_word=$2
23870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23871$as_echo_n "checking for $ac_word... " >&6; }
23872if ${ac_cv_path_DSYMUTIL+:} false; then :
23873  $as_echo_n "(cached) " >&6
23874else
23875  case $DSYMUTIL in
23876  [\\/]* | ?:[\\/]*)
23877  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23878  ;;
23879  *)
23880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23881for as_dir in $PATH
23882do
23883  IFS=$as_save_IFS
23884  test -z "$as_dir" && as_dir=.
23885    for ac_exec_ext in '' $ac_executable_extensions; do
23886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23887    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23889    break 2
23890  fi
23891done
23892  done
23893IFS=$as_save_IFS
23894
23895  ;;
23896esac
23897fi
23898DSYMUTIL=$ac_cv_path_DSYMUTIL
23899if test -n "$DSYMUTIL"; then
23900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23901$as_echo "$DSYMUTIL" >&6; }
23902else
23903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23904$as_echo "no" >&6; }
23905fi
23906
23907
23908  test -n "$DSYMUTIL" && break
23909done
23910
23911  else
23912    # The variable is set, but is it from the command line or the environment?
23913
23914    # Try to remove the string !DSYMUTIL! from our list.
23915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23917      # If it failed, the variable was not from the command line. Ignore it,
23918      # but warn the user (except for BASH, which is always set by the calling BASH).
23919      if test "xDSYMUTIL" != xBASH; then
23920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23921$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23922      fi
23923      # Try to locate tool using the code snippet
23924      for ac_prog in dsymutil
23925do
23926  # Extract the first word of "$ac_prog", so it can be a program name with args.
23927set dummy $ac_prog; ac_word=$2
23928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23929$as_echo_n "checking for $ac_word... " >&6; }
23930if ${ac_cv_path_DSYMUTIL+:} false; then :
23931  $as_echo_n "(cached) " >&6
23932else
23933  case $DSYMUTIL in
23934  [\\/]* | ?:[\\/]*)
23935  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23936  ;;
23937  *)
23938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23939for as_dir in $PATH
23940do
23941  IFS=$as_save_IFS
23942  test -z "$as_dir" && as_dir=.
23943    for ac_exec_ext in '' $ac_executable_extensions; do
23944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23945    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23947    break 2
23948  fi
23949done
23950  done
23951IFS=$as_save_IFS
23952
23953  ;;
23954esac
23955fi
23956DSYMUTIL=$ac_cv_path_DSYMUTIL
23957if test -n "$DSYMUTIL"; then
23958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23959$as_echo "$DSYMUTIL" >&6; }
23960else
23961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23962$as_echo "no" >&6; }
23963fi
23964
23965
23966  test -n "$DSYMUTIL" && break
23967done
23968
23969    else
23970      # If it succeeded, then it was overridden by the user. We will use it
23971      # for the tool.
23972
23973      # First remove it from the list of overridden variables, so we can test
23974      # for unknown variables in the end.
23975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23976
23977      # Check if we try to supply an empty value
23978      if test "x$DSYMUTIL" = x; then
23979        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23980$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23982$as_echo_n "checking for DSYMUTIL... " >&6; }
23983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23984$as_echo "disabled" >&6; }
23985      else
23986        # Check if the provided tool contains a complete path.
23987        tool_specified="$DSYMUTIL"
23988        tool_basename="${tool_specified##*/}"
23989        if test "x$tool_basename" = "x$tool_specified"; then
23990          # A command without a complete path is provided, search $PATH.
23991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23992$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23993          # Extract the first word of "$tool_basename", so it can be a program name with args.
23994set dummy $tool_basename; ac_word=$2
23995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23996$as_echo_n "checking for $ac_word... " >&6; }
23997if ${ac_cv_path_DSYMUTIL+:} false; then :
23998  $as_echo_n "(cached) " >&6
23999else
24000  case $DSYMUTIL in
24001  [\\/]* | ?:[\\/]*)
24002  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24003  ;;
24004  *)
24005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24006for as_dir in $PATH
24007do
24008  IFS=$as_save_IFS
24009  test -z "$as_dir" && as_dir=.
24010    for ac_exec_ext in '' $ac_executable_extensions; do
24011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24012    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24014    break 2
24015  fi
24016done
24017  done
24018IFS=$as_save_IFS
24019
24020  ;;
24021esac
24022fi
24023DSYMUTIL=$ac_cv_path_DSYMUTIL
24024if test -n "$DSYMUTIL"; then
24025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24026$as_echo "$DSYMUTIL" >&6; }
24027else
24028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24029$as_echo "no" >&6; }
24030fi
24031
24032
24033          if test "x$DSYMUTIL" = x; then
24034            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24035          fi
24036        else
24037          # Otherwise we believe it is a complete path. Use it as it is.
24038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24039$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24040          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24041$as_echo_n "checking for DSYMUTIL... " >&6; }
24042          if test ! -x "$tool_specified"; then
24043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24044$as_echo "not found" >&6; }
24045            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24046          fi
24047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24048$as_echo "$tool_specified" >&6; }
24049        fi
24050      fi
24051    fi
24052
24053  fi
24054
24055
24056
24057  if test "x$DSYMUTIL" = x; then
24058    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24059  fi
24060
24061
24062
24063
24064
24065  # Publish this variable in the help.
24066
24067
24068  if [ -z "${XATTR+x}" ]; then
24069    # The variable is not set by user, try to locate tool using the code snippet
24070    for ac_prog in xattr
24071do
24072  # Extract the first word of "$ac_prog", so it can be a program name with args.
24073set dummy $ac_prog; ac_word=$2
24074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24075$as_echo_n "checking for $ac_word... " >&6; }
24076if ${ac_cv_path_XATTR+:} false; then :
24077  $as_echo_n "(cached) " >&6
24078else
24079  case $XATTR in
24080  [\\/]* | ?:[\\/]*)
24081  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24082  ;;
24083  *)
24084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24085for as_dir in $PATH
24086do
24087  IFS=$as_save_IFS
24088  test -z "$as_dir" && as_dir=.
24089    for ac_exec_ext in '' $ac_executable_extensions; do
24090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24091    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24093    break 2
24094  fi
24095done
24096  done
24097IFS=$as_save_IFS
24098
24099  ;;
24100esac
24101fi
24102XATTR=$ac_cv_path_XATTR
24103if test -n "$XATTR"; then
24104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24105$as_echo "$XATTR" >&6; }
24106else
24107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24108$as_echo "no" >&6; }
24109fi
24110
24111
24112  test -n "$XATTR" && break
24113done
24114
24115  else
24116    # The variable is set, but is it from the command line or the environment?
24117
24118    # Try to remove the string !XATTR! from our list.
24119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24121      # If it failed, the variable was not from the command line. Ignore it,
24122      # but warn the user (except for BASH, which is always set by the calling BASH).
24123      if test "xXATTR" != xBASH; then
24124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24125$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24126      fi
24127      # Try to locate tool using the code snippet
24128      for ac_prog in xattr
24129do
24130  # Extract the first word of "$ac_prog", so it can be a program name with args.
24131set dummy $ac_prog; ac_word=$2
24132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24133$as_echo_n "checking for $ac_word... " >&6; }
24134if ${ac_cv_path_XATTR+:} false; then :
24135  $as_echo_n "(cached) " >&6
24136else
24137  case $XATTR in
24138  [\\/]* | ?:[\\/]*)
24139  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24140  ;;
24141  *)
24142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24143for as_dir in $PATH
24144do
24145  IFS=$as_save_IFS
24146  test -z "$as_dir" && as_dir=.
24147    for ac_exec_ext in '' $ac_executable_extensions; do
24148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24149    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24151    break 2
24152  fi
24153done
24154  done
24155IFS=$as_save_IFS
24156
24157  ;;
24158esac
24159fi
24160XATTR=$ac_cv_path_XATTR
24161if test -n "$XATTR"; then
24162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24163$as_echo "$XATTR" >&6; }
24164else
24165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24166$as_echo "no" >&6; }
24167fi
24168
24169
24170  test -n "$XATTR" && break
24171done
24172
24173    else
24174      # If it succeeded, then it was overridden by the user. We will use it
24175      # for the tool.
24176
24177      # First remove it from the list of overridden variables, so we can test
24178      # for unknown variables in the end.
24179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24180
24181      # Check if we try to supply an empty value
24182      if test "x$XATTR" = x; then
24183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24184$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24186$as_echo_n "checking for XATTR... " >&6; }
24187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24188$as_echo "disabled" >&6; }
24189      else
24190        # Check if the provided tool contains a complete path.
24191        tool_specified="$XATTR"
24192        tool_basename="${tool_specified##*/}"
24193        if test "x$tool_basename" = "x$tool_specified"; then
24194          # A command without a complete path is provided, search $PATH.
24195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24196$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24197          # Extract the first word of "$tool_basename", so it can be a program name with args.
24198set dummy $tool_basename; ac_word=$2
24199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24200$as_echo_n "checking for $ac_word... " >&6; }
24201if ${ac_cv_path_XATTR+:} false; then :
24202  $as_echo_n "(cached) " >&6
24203else
24204  case $XATTR in
24205  [\\/]* | ?:[\\/]*)
24206  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24207  ;;
24208  *)
24209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24210for as_dir in $PATH
24211do
24212  IFS=$as_save_IFS
24213  test -z "$as_dir" && as_dir=.
24214    for ac_exec_ext in '' $ac_executable_extensions; do
24215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24216    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24218    break 2
24219  fi
24220done
24221  done
24222IFS=$as_save_IFS
24223
24224  ;;
24225esac
24226fi
24227XATTR=$ac_cv_path_XATTR
24228if test -n "$XATTR"; then
24229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24230$as_echo "$XATTR" >&6; }
24231else
24232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24233$as_echo "no" >&6; }
24234fi
24235
24236
24237          if test "x$XATTR" = x; then
24238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24239          fi
24240        else
24241          # Otherwise we believe it is a complete path. Use it as it is.
24242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24243$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24245$as_echo_n "checking for XATTR... " >&6; }
24246          if test ! -x "$tool_specified"; then
24247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24248$as_echo "not found" >&6; }
24249            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24250          fi
24251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24252$as_echo "$tool_specified" >&6; }
24253        fi
24254      fi
24255    fi
24256
24257  fi
24258
24259
24260
24261  if test "x$XATTR" = x; then
24262    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24263  fi
24264
24265
24266
24267
24268  # Publish this variable in the help.
24269
24270
24271  if [ -z "${CODESIGN+x}" ]; then
24272    # The variable is not set by user, try to locate tool using the code snippet
24273    for ac_prog in codesign
24274do
24275  # Extract the first word of "$ac_prog", so it can be a program name with args.
24276set dummy $ac_prog; ac_word=$2
24277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24278$as_echo_n "checking for $ac_word... " >&6; }
24279if ${ac_cv_path_CODESIGN+:} false; then :
24280  $as_echo_n "(cached) " >&6
24281else
24282  case $CODESIGN in
24283  [\\/]* | ?:[\\/]*)
24284  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24285  ;;
24286  *)
24287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24288for as_dir in $PATH
24289do
24290  IFS=$as_save_IFS
24291  test -z "$as_dir" && as_dir=.
24292    for ac_exec_ext in '' $ac_executable_extensions; do
24293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24294    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24296    break 2
24297  fi
24298done
24299  done
24300IFS=$as_save_IFS
24301
24302  ;;
24303esac
24304fi
24305CODESIGN=$ac_cv_path_CODESIGN
24306if test -n "$CODESIGN"; then
24307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24308$as_echo "$CODESIGN" >&6; }
24309else
24310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24311$as_echo "no" >&6; }
24312fi
24313
24314
24315  test -n "$CODESIGN" && break
24316done
24317
24318  else
24319    # The variable is set, but is it from the command line or the environment?
24320
24321    # Try to remove the string !CODESIGN! from our list.
24322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24324      # If it failed, the variable was not from the command line. Ignore it,
24325      # but warn the user (except for BASH, which is always set by the calling BASH).
24326      if test "xCODESIGN" != xBASH; then
24327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24328$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24329      fi
24330      # Try to locate tool using the code snippet
24331      for ac_prog in codesign
24332do
24333  # Extract the first word of "$ac_prog", so it can be a program name with args.
24334set dummy $ac_prog; ac_word=$2
24335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24336$as_echo_n "checking for $ac_word... " >&6; }
24337if ${ac_cv_path_CODESIGN+:} false; then :
24338  $as_echo_n "(cached) " >&6
24339else
24340  case $CODESIGN in
24341  [\\/]* | ?:[\\/]*)
24342  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24343  ;;
24344  *)
24345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24346for as_dir in $PATH
24347do
24348  IFS=$as_save_IFS
24349  test -z "$as_dir" && as_dir=.
24350    for ac_exec_ext in '' $ac_executable_extensions; do
24351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24352    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24354    break 2
24355  fi
24356done
24357  done
24358IFS=$as_save_IFS
24359
24360  ;;
24361esac
24362fi
24363CODESIGN=$ac_cv_path_CODESIGN
24364if test -n "$CODESIGN"; then
24365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24366$as_echo "$CODESIGN" >&6; }
24367else
24368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24369$as_echo "no" >&6; }
24370fi
24371
24372
24373  test -n "$CODESIGN" && break
24374done
24375
24376    else
24377      # If it succeeded, then it was overridden by the user. We will use it
24378      # for the tool.
24379
24380      # First remove it from the list of overridden variables, so we can test
24381      # for unknown variables in the end.
24382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24383
24384      # Check if we try to supply an empty value
24385      if test "x$CODESIGN" = x; then
24386        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24387$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24388        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24389$as_echo_n "checking for CODESIGN... " >&6; }
24390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24391$as_echo "disabled" >&6; }
24392      else
24393        # Check if the provided tool contains a complete path.
24394        tool_specified="$CODESIGN"
24395        tool_basename="${tool_specified##*/}"
24396        if test "x$tool_basename" = "x$tool_specified"; then
24397          # A command without a complete path is provided, search $PATH.
24398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24399$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24400          # Extract the first word of "$tool_basename", so it can be a program name with args.
24401set dummy $tool_basename; ac_word=$2
24402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24403$as_echo_n "checking for $ac_word... " >&6; }
24404if ${ac_cv_path_CODESIGN+:} false; then :
24405  $as_echo_n "(cached) " >&6
24406else
24407  case $CODESIGN in
24408  [\\/]* | ?:[\\/]*)
24409  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24410  ;;
24411  *)
24412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24413for as_dir in $PATH
24414do
24415  IFS=$as_save_IFS
24416  test -z "$as_dir" && as_dir=.
24417    for ac_exec_ext in '' $ac_executable_extensions; do
24418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24419    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24421    break 2
24422  fi
24423done
24424  done
24425IFS=$as_save_IFS
24426
24427  ;;
24428esac
24429fi
24430CODESIGN=$ac_cv_path_CODESIGN
24431if test -n "$CODESIGN"; then
24432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24433$as_echo "$CODESIGN" >&6; }
24434else
24435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24436$as_echo "no" >&6; }
24437fi
24438
24439
24440          if test "x$CODESIGN" = x; then
24441            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24442          fi
24443        else
24444          # Otherwise we believe it is a complete path. Use it as it is.
24445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24446$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24447          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24448$as_echo_n "checking for CODESIGN... " >&6; }
24449          if test ! -x "$tool_specified"; then
24450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24451$as_echo "not found" >&6; }
24452            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24453          fi
24454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24455$as_echo "$tool_specified" >&6; }
24456        fi
24457      fi
24458    fi
24459
24460  fi
24461
24462
24463    if test "x$CODESIGN" != "x"; then
24464      # Verify that the openjdk_codesign certificate is present
24465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24466$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24467      $RM codesign-testfile
24468      $TOUCH codesign-testfile
24469      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24470      $RM codesign-testfile
24471      if test "x$CODESIGN" = x; then
24472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24473$as_echo "no" >&6; }
24474      else
24475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24476$as_echo "yes" >&6; }
24477      fi
24478    fi
24479
24480
24481
24482  # Publish this variable in the help.
24483
24484
24485  if [ -z "${SETFILE+x}" ]; then
24486    # The variable is not set by user, try to locate tool using the code snippet
24487    for ac_prog in SetFile
24488do
24489  # Extract the first word of "$ac_prog", so it can be a program name with args.
24490set dummy $ac_prog; ac_word=$2
24491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24492$as_echo_n "checking for $ac_word... " >&6; }
24493if ${ac_cv_path_SETFILE+:} false; then :
24494  $as_echo_n "(cached) " >&6
24495else
24496  case $SETFILE in
24497  [\\/]* | ?:[\\/]*)
24498  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24499  ;;
24500  *)
24501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24502for as_dir in $PATH
24503do
24504  IFS=$as_save_IFS
24505  test -z "$as_dir" && as_dir=.
24506    for ac_exec_ext in '' $ac_executable_extensions; do
24507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24508    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24510    break 2
24511  fi
24512done
24513  done
24514IFS=$as_save_IFS
24515
24516  ;;
24517esac
24518fi
24519SETFILE=$ac_cv_path_SETFILE
24520if test -n "$SETFILE"; then
24521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24522$as_echo "$SETFILE" >&6; }
24523else
24524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24525$as_echo "no" >&6; }
24526fi
24527
24528
24529  test -n "$SETFILE" && break
24530done
24531
24532  else
24533    # The variable is set, but is it from the command line or the environment?
24534
24535    # Try to remove the string !SETFILE! from our list.
24536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24538      # If it failed, the variable was not from the command line. Ignore it,
24539      # but warn the user (except for BASH, which is always set by the calling BASH).
24540      if test "xSETFILE" != xBASH; then
24541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24542$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24543      fi
24544      # Try to locate tool using the code snippet
24545      for ac_prog in SetFile
24546do
24547  # Extract the first word of "$ac_prog", so it can be a program name with args.
24548set dummy $ac_prog; ac_word=$2
24549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24550$as_echo_n "checking for $ac_word... " >&6; }
24551if ${ac_cv_path_SETFILE+:} false; then :
24552  $as_echo_n "(cached) " >&6
24553else
24554  case $SETFILE in
24555  [\\/]* | ?:[\\/]*)
24556  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24557  ;;
24558  *)
24559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24560for as_dir in $PATH
24561do
24562  IFS=$as_save_IFS
24563  test -z "$as_dir" && as_dir=.
24564    for ac_exec_ext in '' $ac_executable_extensions; do
24565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24566    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24568    break 2
24569  fi
24570done
24571  done
24572IFS=$as_save_IFS
24573
24574  ;;
24575esac
24576fi
24577SETFILE=$ac_cv_path_SETFILE
24578if test -n "$SETFILE"; then
24579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24580$as_echo "$SETFILE" >&6; }
24581else
24582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24583$as_echo "no" >&6; }
24584fi
24585
24586
24587  test -n "$SETFILE" && break
24588done
24589
24590    else
24591      # If it succeeded, then it was overridden by the user. We will use it
24592      # for the tool.
24593
24594      # First remove it from the list of overridden variables, so we can test
24595      # for unknown variables in the end.
24596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24597
24598      # Check if we try to supply an empty value
24599      if test "x$SETFILE" = x; then
24600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24601$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24603$as_echo_n "checking for SETFILE... " >&6; }
24604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24605$as_echo "disabled" >&6; }
24606      else
24607        # Check if the provided tool contains a complete path.
24608        tool_specified="$SETFILE"
24609        tool_basename="${tool_specified##*/}"
24610        if test "x$tool_basename" = "x$tool_specified"; then
24611          # A command without a complete path is provided, search $PATH.
24612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24613$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24614          # Extract the first word of "$tool_basename", so it can be a program name with args.
24615set dummy $tool_basename; ac_word=$2
24616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24617$as_echo_n "checking for $ac_word... " >&6; }
24618if ${ac_cv_path_SETFILE+:} false; then :
24619  $as_echo_n "(cached) " >&6
24620else
24621  case $SETFILE in
24622  [\\/]* | ?:[\\/]*)
24623  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24624  ;;
24625  *)
24626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24627for as_dir in $PATH
24628do
24629  IFS=$as_save_IFS
24630  test -z "$as_dir" && as_dir=.
24631    for ac_exec_ext in '' $ac_executable_extensions; do
24632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24633    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24635    break 2
24636  fi
24637done
24638  done
24639IFS=$as_save_IFS
24640
24641  ;;
24642esac
24643fi
24644SETFILE=$ac_cv_path_SETFILE
24645if test -n "$SETFILE"; then
24646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24647$as_echo "$SETFILE" >&6; }
24648else
24649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24650$as_echo "no" >&6; }
24651fi
24652
24653
24654          if test "x$SETFILE" = x; then
24655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24656          fi
24657        else
24658          # Otherwise we believe it is a complete path. Use it as it is.
24659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24660$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24662$as_echo_n "checking for SETFILE... " >&6; }
24663          if test ! -x "$tool_specified"; then
24664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24665$as_echo "not found" >&6; }
24666            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24667          fi
24668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24669$as_echo "$tool_specified" >&6; }
24670        fi
24671      fi
24672    fi
24673
24674  fi
24675
24676
24677
24678  if test "x$SETFILE" = x; then
24679    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24680  fi
24681
24682
24683  fi
24684
24685
24686  # Check bash version
24687  # Extra [ ] to stop m4 mangling
24688   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24690$as_echo_n "checking bash version... " >&6; }
24691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24692$as_echo "$BASH_VER" >&6; }
24693
24694  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24695  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24696  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24697    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24698  fi
24699
24700  # Test if bash supports pipefail.
24701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24702$as_echo_n "checking if bash supports pipefail... " >&6; }
24703  if ${BASH} -c 'set -o pipefail'; then
24704    BASH_ARGS="$BASH_ARGS -o pipefail"
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24706$as_echo "yes" >&6; }
24707  else
24708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24709$as_echo "no" >&6; }
24710  fi
24711
24712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24713$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24714  if ${BASH} -e -c 'true'; then
24715    BASH_ARGS="$BASH_ARGS -e"
24716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24717$as_echo "yes" >&6; }
24718  else
24719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24720$as_echo "no" >&6; }
24721  fi
24722
24723
24724
24725
24726# Check if pkg-config is available.
24727
24728
24729if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24730	if test -n "$ac_tool_prefix"; then
24731  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24732set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24734$as_echo_n "checking for $ac_word... " >&6; }
24735if ${ac_cv_path_PKG_CONFIG+:} false; then :
24736  $as_echo_n "(cached) " >&6
24737else
24738  case $PKG_CONFIG in
24739  [\\/]* | ?:[\\/]*)
24740  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24741  ;;
24742  *)
24743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24744for as_dir in $PATH
24745do
24746  IFS=$as_save_IFS
24747  test -z "$as_dir" && as_dir=.
24748    for ac_exec_ext in '' $ac_executable_extensions; do
24749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24750    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24752    break 2
24753  fi
24754done
24755  done
24756IFS=$as_save_IFS
24757
24758  ;;
24759esac
24760fi
24761PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24762if test -n "$PKG_CONFIG"; then
24763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24764$as_echo "$PKG_CONFIG" >&6; }
24765else
24766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24767$as_echo "no" >&6; }
24768fi
24769
24770
24771fi
24772if test -z "$ac_cv_path_PKG_CONFIG"; then
24773  ac_pt_PKG_CONFIG=$PKG_CONFIG
24774  # Extract the first word of "pkg-config", so it can be a program name with args.
24775set dummy pkg-config; ac_word=$2
24776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24777$as_echo_n "checking for $ac_word... " >&6; }
24778if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24779  $as_echo_n "(cached) " >&6
24780else
24781  case $ac_pt_PKG_CONFIG in
24782  [\\/]* | ?:[\\/]*)
24783  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24784  ;;
24785  *)
24786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24787for as_dir in $PATH
24788do
24789  IFS=$as_save_IFS
24790  test -z "$as_dir" && as_dir=.
24791    for ac_exec_ext in '' $ac_executable_extensions; do
24792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24793    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24795    break 2
24796  fi
24797done
24798  done
24799IFS=$as_save_IFS
24800
24801  ;;
24802esac
24803fi
24804ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24805if test -n "$ac_pt_PKG_CONFIG"; then
24806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24807$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24808else
24809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24810$as_echo "no" >&6; }
24811fi
24812
24813  if test "x$ac_pt_PKG_CONFIG" = x; then
24814    PKG_CONFIG=""
24815  else
24816    case $cross_compiling:$ac_tool_warned in
24817yes:)
24818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24820ac_tool_warned=yes ;;
24821esac
24822    PKG_CONFIG=$ac_pt_PKG_CONFIG
24823  fi
24824else
24825  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24826fi
24827
24828fi
24829if test -n "$PKG_CONFIG"; then
24830	_pkg_min_version=0.9.0
24831	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24832$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24833	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24834		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24835$as_echo "yes" >&6; }
24836	else
24837		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24838$as_echo "no" >&6; }
24839		PKG_CONFIG=""
24840	fi
24841
24842fi
24843
24844# After basic tools have been setup, we can check build os specific details.
24845
24846  ###############################################################################
24847
24848  # Note that this is the build platform OS version!
24849
24850  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24851  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24852  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24853  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24854
24855
24856
24857
24858
24859# Misc basic settings
24860
24861
24862# Check whether --with-default-make-target was given.
24863if test "${with_default_make_target+set}" = set; then :
24864  withval=$with_default_make_target;
24865fi
24866
24867  if test "x$with_default_make_target" = "x" \
24868      || test "x$with_default_make_target" = "xyes"; then
24869    DEFAULT_MAKE_TARGET="exploded-image"
24870  elif test "x$with_default_make_target" = "xno"; then
24871    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24872  else
24873    DEFAULT_MAKE_TARGET="$with_default_make_target"
24874  fi
24875
24876
24877
24878
24879###############################################################################
24880#
24881# Determine OpenJDK variants, options and version numbers.
24882#
24883###############################################################################
24884
24885# We need build & target for this.
24886
24887  # Should we build a JDK without a graphical UI?
24888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24889$as_echo_n "checking headless only... " >&6; }
24890  # Check whether --enable-headless-only was given.
24891if test "${enable_headless_only+set}" = set; then :
24892  enableval=$enable_headless_only;
24893fi
24894
24895
24896  if test "x$enable_headless_only" = "xyes"; then
24897    ENABLE_HEADLESS_ONLY="true"
24898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24899$as_echo "yes" >&6; }
24900  elif test "x$enable_headless_only" = "xno"; then
24901    ENABLE_HEADLESS_ONLY="false"
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24903$as_echo "no" >&6; }
24904  elif test "x$enable_headless_only" = "x"; then
24905    ENABLE_HEADLESS_ONLY="false"
24906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24907$as_echo "no" >&6; }
24908  else
24909    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24910  fi
24911
24912
24913
24914  # Should we build the complete docs, or just a lightweight version?
24915  # Check whether --enable-full-docs was given.
24916if test "${enable_full_docs+set}" = set; then :
24917  enableval=$enable_full_docs;
24918fi
24919
24920
24921  # Verify dependencies
24922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24923$as_echo_n "checking for graphviz dot... " >&6; }
24924  if test "x$DOT" != "x"; then
24925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24926$as_echo "yes" >&6; }
24927  else
24928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24929$as_echo "no, cannot generate full docs" >&6; }
24930    FULL_DOCS_DEP_MISSING=true
24931  fi
24932
24933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24934$as_echo_n "checking for pandoc... " >&6; }
24935  if test "x$PANDOC" != "x"; then
24936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24937$as_echo "yes" >&6; }
24938  else
24939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24940$as_echo "no, cannot generate full docs" >&6; }
24941    FULL_DOCS_DEP_MISSING=true
24942  fi
24943
24944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24945$as_echo_n "checking full docs... " >&6; }
24946  if test "x$enable_full_docs" = xyes; then
24947    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24949$as_echo "no, missing dependencies" >&6; }
24950
24951  # Print a helpful message on how to acquire the necessary build dependency.
24952  # dot is the help tag: freetype, cups, alsa etc
24953  MISSING_DEPENDENCY=dot
24954
24955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24956    cygwin_help $MISSING_DEPENDENCY
24957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24958    msys_help $MISSING_DEPENDENCY
24959  else
24960    PKGHANDLER_COMMAND=
24961
24962    case $PKGHANDLER in
24963      apt-get)
24964        apt_help     $MISSING_DEPENDENCY ;;
24965      yum)
24966        yum_help     $MISSING_DEPENDENCY ;;
24967      brew)
24968        brew_help    $MISSING_DEPENDENCY ;;
24969      port)
24970        port_help    $MISSING_DEPENDENCY ;;
24971      pkgutil)
24972        pkgutil_help $MISSING_DEPENDENCY ;;
24973      pkgadd)
24974        pkgadd_help  $MISSING_DEPENDENCY ;;
24975    esac
24976
24977    if test "x$PKGHANDLER_COMMAND" != x; then
24978      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24979    fi
24980  fi
24981
24982      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24983    else
24984      ENABLE_FULL_DOCS=true
24985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24986$as_echo "yes, forced" >&6; }
24987    fi
24988  elif test "x$enable_full_docs" = xno; then
24989    ENABLE_FULL_DOCS=false
24990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24991$as_echo "no, forced" >&6; }
24992  elif test "x$enable_full_docs" = x; then
24993    # Check for prerequisites
24994    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24995      ENABLE_FULL_DOCS=false
24996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24997$as_echo "no, missing dependencies" >&6; }
24998    else
24999      ENABLE_FULL_DOCS=true
25000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25001$as_echo "yes, dependencies present" >&6; }
25002    fi
25003  else
25004    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25005  fi
25006
25007
25008
25009  # Choose cacerts source file
25010
25011# Check whether --with-cacerts-file was given.
25012if test "${with_cacerts_file+set}" = set; then :
25013  withval=$with_cacerts_file;
25014fi
25015
25016  if test "x$with_cacerts_file" != x; then
25017    CACERTS_FILE=$with_cacerts_file
25018  fi
25019
25020
25021  # Enable or disable unlimited crypto
25022  # Check whether --enable-unlimited-crypto was given.
25023if test "${enable_unlimited_crypto+set}" = set; then :
25024  enableval=$enable_unlimited_crypto;
25025else
25026  enable_unlimited_crypto=yes
25027fi
25028
25029  if test "x$enable_unlimited_crypto" = "xyes"; then
25030    UNLIMITED_CRYPTO=true
25031  else
25032    UNLIMITED_CRYPTO=false
25033  fi
25034
25035
25036  # Should we build the serviceability agent (SA)?
25037  INCLUDE_SA=true
25038  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25039    INCLUDE_SA=false
25040  fi
25041  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25042    INCLUDE_SA=false
25043  fi
25044
25045
25046  # Compress jars
25047  COMPRESS_JARS=false
25048
25049
25050
25051  # Setup default copyright year. Mostly overridden when building close to a new year.
25052
25053# Check whether --with-copyright-year was given.
25054if test "${with_copyright_year+set}" = set; then :
25055  withval=$with_copyright_year;
25056fi
25057
25058  if test "x$with_copyright_year" = xyes; then
25059    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25060  elif test "x$with_copyright_year" != x; then
25061    COPYRIGHT_YEAR="$with_copyright_year"
25062  else
25063    COPYRIGHT_YEAR=`$DATE +'%Y'`
25064  fi
25065
25066
25067
25068  # Check whether --enable-keep-packaged-modules was given.
25069if test "${enable_keep_packaged_modules+set}" = set; then :
25070  enableval=$enable_keep_packaged_modules;
25071fi
25072
25073
25074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25075$as_echo_n "checking if packaged modules are kept... " >&6; }
25076  if test "x$enable_keep_packaged_modules" = "xyes"; then
25077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25078$as_echo "yes" >&6; }
25079    JLINK_KEEP_PACKAGED_MODULES=true
25080  elif test "x$enable_keep_packaged_modules" = "xno"; then
25081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25082$as_echo "no" >&6; }
25083    JLINK_KEEP_PACKAGED_MODULES=false
25084  elif test "x$enable_keep_packaged_modules" = "x"; then
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25086$as_echo "yes (default)" >&6; }
25087    JLINK_KEEP_PACKAGED_MODULES=true
25088  else
25089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25090$as_echo "error" >&6; }
25091    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25092  fi
25093
25094
25095
25096
25097  # Warn user that old version arguments are deprecated.
25098
25099
25100# Check whether --with-milestone was given.
25101if test "${with_milestone+set}" = set; then :
25102  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25103$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25104fi
25105
25106
25107
25108
25109# Check whether --with-update-version was given.
25110if test "${with_update_version+set}" = set; then :
25111  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25112$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25113fi
25114
25115
25116
25117
25118# Check whether --with-user-release-suffix was given.
25119if test "${with_user_release_suffix+set}" = set; then :
25120  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
25121$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25122fi
25123
25124
25125
25126
25127# Check whether --with-build-number was given.
25128if test "${with_build_number+set}" = set; then :
25129  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25130$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25131fi
25132
25133
25134
25135  # Source the version numbers file
25136  . $AUTOCONF_DIR/version-numbers
25137
25138  # Some non-version number information is set in that file
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148  # Override version from arguments
25149
25150  # If --with-version-string is set, process it first. It is possible to
25151  # override parts with more specific flags, since these are processed later.
25152
25153# Check whether --with-version-string was given.
25154if test "${with_version_string+set}" = set; then :
25155  withval=$with_version_string;
25156fi
25157
25158  if test "x$with_version_string" = xyes; then
25159    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25160  elif test "x$with_version_string" != x; then
25161    # Additional [] needed to keep m4 from mangling shell constructs.
25162    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25163      VERSION_MAJOR=${BASH_REMATCH[1]}
25164      VERSION_MINOR=${BASH_REMATCH[3]}
25165      VERSION_SECURITY=${BASH_REMATCH[5]}
25166      VERSION_PATCH=${BASH_REMATCH[7]}
25167      VERSION_PRE=${BASH_REMATCH[9]}
25168      version_plus_separator=${BASH_REMATCH[11]}
25169      VERSION_BUILD=${BASH_REMATCH[12]}
25170      VERSION_OPT=${BASH_REMATCH[14]}
25171      # Unspecified numerical fields are interpreted as 0.
25172      if test "x$VERSION_MINOR" = x; then
25173        VERSION_MINOR=0
25174      fi
25175      if test "x$VERSION_SECURITY" = x; then
25176        VERSION_SECURITY=0
25177      fi
25178      if test "x$VERSION_PATCH" = x; then
25179        VERSION_PATCH=0
25180      fi
25181      if test "x$version_plus_separator" != x \
25182          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25183        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25184      fi
25185      # Stop the version part process from setting default values.
25186      # We still allow them to explicitly override though.
25187      NO_DEFAULT_VERSION_PARTS=true
25188    else
25189      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25190    fi
25191  fi
25192
25193
25194# Check whether --with-version-pre was given.
25195if test "${with_version_pre+set}" = set; then :
25196  withval=$with_version_pre; with_version_pre_present=true
25197else
25198  with_version_pre_present=false
25199fi
25200
25201
25202  if test "x$with_version_pre_present" = xtrue; then
25203    if test "x$with_version_pre" = xyes; then
25204      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25205    elif test "x$with_version_pre" = xno; then
25206      # Interpret --without-* as empty string instead of the literal "no"
25207      VERSION_PRE=
25208    else
25209      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25210       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25211      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25213$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25214      fi
25215    fi
25216  else
25217    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25218      # Default is to use "internal" as pre
25219      VERSION_PRE="internal"
25220    fi
25221  fi
25222
25223
25224# Check whether --with-version-opt was given.
25225if test "${with_version_opt+set}" = set; then :
25226  withval=$with_version_opt; with_version_opt_present=true
25227else
25228  with_version_opt_present=false
25229fi
25230
25231
25232  if test "x$with_version_opt_present" = xtrue; then
25233    if test "x$with_version_opt" = xyes; then
25234      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25235    elif test "x$with_version_opt" = xno; then
25236      # Interpret --without-* as empty string instead of the literal "no"
25237      VERSION_OPT=
25238    else
25239      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25240       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25241      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25243$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25244      fi
25245    fi
25246  else
25247    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25248      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25249      # Outer [ ] to quote m4.
25250       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25251      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25252    fi
25253  fi
25254
25255
25256# Check whether --with-version-build was given.
25257if test "${with_version_build+set}" = set; then :
25258  withval=$with_version_build; with_version_build_present=true
25259else
25260  with_version_build_present=false
25261fi
25262
25263
25264  if test "x$with_version_build_present" = xtrue; then
25265    if test "x$with_version_build" = xyes; then
25266      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25267    elif test "x$with_version_build" = xno; then
25268      # Interpret --without-* as empty string instead of the literal "no"
25269      VERSION_BUILD=
25270    elif test "x$with_version_build" = x; then
25271      VERSION_BUILD=
25272    else
25273
25274  # Additional [] needed to keep m4 from mangling shell constructs.
25275  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25276    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25277  fi
25278  # Extract the version number without leading zeros.
25279  cleaned_value=${BASH_REMATCH[1]}
25280  if test "x$cleaned_value" = x; then
25281    # Special case for zero
25282    cleaned_value=${BASH_REMATCH[2]}
25283  fi
25284
25285  if test $cleaned_value -gt 255; then
25286    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25287  fi
25288  if test "x$cleaned_value" != "x$with_version_build"; then
25289    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25290$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25291  fi
25292  VERSION_BUILD=$cleaned_value
25293
25294    fi
25295  else
25296    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25297      # Default is to not have a build number.
25298      VERSION_BUILD=""
25299      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25300      VERSION_BUILD=0
25301    fi
25302  fi
25303
25304
25305# Check whether --with-version-major was given.
25306if test "${with_version_major+set}" = set; then :
25307  withval=$with_version_major; with_version_major_present=true
25308else
25309  with_version_major_present=false
25310fi
25311
25312
25313  if test "x$with_version_major_present" = xtrue; then
25314    if test "x$with_version_major" = xyes; then
25315      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25316    else
25317
25318  # Additional [] needed to keep m4 from mangling shell constructs.
25319  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25320    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25321  fi
25322  # Extract the version number without leading zeros.
25323  cleaned_value=${BASH_REMATCH[1]}
25324  if test "x$cleaned_value" = x; then
25325    # Special case for zero
25326    cleaned_value=${BASH_REMATCH[2]}
25327  fi
25328
25329  if test $cleaned_value -gt 255; then
25330    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25331  fi
25332  if test "x$cleaned_value" != "x$with_version_major"; then
25333    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25334$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25335  fi
25336  VERSION_MAJOR=$cleaned_value
25337
25338    fi
25339  else
25340    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25341      # Default is to get value from version-numbers
25342      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25343    fi
25344  fi
25345
25346
25347# Check whether --with-version-minor was given.
25348if test "${with_version_minor+set}" = set; then :
25349  withval=$with_version_minor; with_version_minor_present=true
25350else
25351  with_version_minor_present=false
25352fi
25353
25354
25355  if test "x$with_version_minor_present" = xtrue; then
25356    if test "x$with_version_minor" = xyes; then
25357      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25358    elif test "x$with_version_minor" = xno; then
25359      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25360      VERSION_MINOR=0
25361    elif test "x$with_version_minor" = x; then
25362      VERSION_MINOR=0
25363    else
25364
25365  # Additional [] needed to keep m4 from mangling shell constructs.
25366  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25367    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25368  fi
25369  # Extract the version number without leading zeros.
25370  cleaned_value=${BASH_REMATCH[1]}
25371  if test "x$cleaned_value" = x; then
25372    # Special case for zero
25373    cleaned_value=${BASH_REMATCH[2]}
25374  fi
25375
25376  if test $cleaned_value -gt 255; then
25377    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25378  fi
25379  if test "x$cleaned_value" != "x$with_version_minor"; then
25380    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25381$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25382  fi
25383  VERSION_MINOR=$cleaned_value
25384
25385    fi
25386  else
25387    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25388      # Default is 0, if unspecified
25389      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25390    fi
25391  fi
25392
25393
25394# Check whether --with-version-security was given.
25395if test "${with_version_security+set}" = set; then :
25396  withval=$with_version_security; with_version_security_present=true
25397else
25398  with_version_security_present=false
25399fi
25400
25401
25402  if test "x$with_version_security_present" = xtrue; then
25403    if test "x$with_version_security" = xyes; then
25404      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25405    elif test "x$with_version_security" = xno; then
25406      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25407      VERSION_SECURITY=0
25408    elif test "x$with_version_security" = x; then
25409      VERSION_SECURITY=0
25410    else
25411
25412  # Additional [] needed to keep m4 from mangling shell constructs.
25413  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25414    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25415  fi
25416  # Extract the version number without leading zeros.
25417  cleaned_value=${BASH_REMATCH[1]}
25418  if test "x$cleaned_value" = x; then
25419    # Special case for zero
25420    cleaned_value=${BASH_REMATCH[2]}
25421  fi
25422
25423  if test $cleaned_value -gt 255; then
25424    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25425  fi
25426  if test "x$cleaned_value" != "x$with_version_security"; then
25427    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25428$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25429  fi
25430  VERSION_SECURITY=$cleaned_value
25431
25432    fi
25433  else
25434    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25435      # Default is 0, if unspecified
25436      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25437    fi
25438  fi
25439
25440
25441# Check whether --with-version-patch was given.
25442if test "${with_version_patch+set}" = set; then :
25443  withval=$with_version_patch; with_version_patch_present=true
25444else
25445  with_version_patch_present=false
25446fi
25447
25448
25449  if test "x$with_version_patch_present" = xtrue; then
25450    if test "x$with_version_patch" = xyes; then
25451      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25452    elif test "x$with_version_patch" = xno; then
25453      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25454      VERSION_PATCH=0
25455    elif test "x$with_version_patch" = x; then
25456      VERSION_PATCH=0
25457    else
25458
25459  # Additional [] needed to keep m4 from mangling shell constructs.
25460  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25461    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25462  fi
25463  # Extract the version number without leading zeros.
25464  cleaned_value=${BASH_REMATCH[1]}
25465  if test "x$cleaned_value" = x; then
25466    # Special case for zero
25467    cleaned_value=${BASH_REMATCH[2]}
25468  fi
25469
25470  if test $cleaned_value -gt 255; then
25471    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25472  fi
25473  if test "x$cleaned_value" != "x$with_version_patch"; then
25474    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25475$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25476  fi
25477  VERSION_PATCH=$cleaned_value
25478
25479    fi
25480  else
25481    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25482      # Default is 0, if unspecified
25483      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25484    fi
25485  fi
25486
25487  # Calculate derived version properties
25488
25489  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25490  if test "x$VERSION_PRE" = x; then
25491    VERSION_IS_GA=true
25492  else
25493    VERSION_IS_GA=false
25494  fi
25495
25496  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25497  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25498
25499  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25500  # Strip trailing zeroes from stripped_version_number
25501  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25502  VERSION_NUMBER=$stripped_version_number
25503
25504  # The complete version string, with additional build information
25505  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25506    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25507  else
25508    # If either build or opt is set, we need a + separator
25509    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25510  fi
25511
25512  # The short version string, just VERSION_NUMBER and PRE, if present.
25513  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25514
25515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25516$as_echo_n "checking for version string... " >&6; }
25517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25518$as_echo "$VERSION_STRING" >&6; }
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534###############################################################################
25535#
25536# Setup BootJDK, used to bootstrap the build.
25537#
25538###############################################################################
25539
25540
25541  BOOT_JDK_FOUND=no
25542
25543# Check whether --with-boot-jdk was given.
25544if test "${with_boot_jdk+set}" = set; then :
25545  withval=$with_boot_jdk;
25546fi
25547
25548
25549  # We look for the Boot JDK through various means, going from more certain to
25550  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25551  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25552  # must check if this is indeed valid; otherwise we'll continue looking.
25553
25554  # Test: Is bootjdk explicitly set by command line arguments?
25555
25556  if test "x$BOOT_JDK_FOUND" = xno; then
25557    # Now execute the test
25558
25559  if test "x$with_boot_jdk" != x; then
25560    BOOT_JDK=$with_boot_jdk
25561    BOOT_JDK_FOUND=maybe
25562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25563$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25564  fi
25565
25566
25567    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25568    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25569      # Do we have a bin/java?
25570      if test ! -x "$BOOT_JDK/bin/java"; then
25571        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25573        BOOT_JDK_FOUND=no
25574      else
25575        # Do we have a bin/javac?
25576        if test ! -x "$BOOT_JDK/bin/javac"; then
25577          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25579          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25580$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25581          BOOT_JDK_FOUND=no
25582        else
25583          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25584          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25585
25586          # Extra M4 quote needed to protect [] in grep expression.
25587          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25588          if test "x$FOUND_CORRECT_VERSION" = x; then
25589            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25591            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25592$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25593            BOOT_JDK_FOUND=no
25594          else
25595            # We're done! :-)
25596            BOOT_JDK_FOUND=yes
25597
25598  # Only process if variable expands to non-empty
25599
25600  if test "x$BOOT_JDK" != x; then
25601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25602
25603  # Input might be given as Windows format, start by converting to
25604  # unix format.
25605  path="$BOOT_JDK"
25606  new_path=`$CYGPATH -u "$path"`
25607
25608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25611  # "foo.exe" is OK but "foo" is an error.
25612  #
25613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25614  # It is also a way to make sure we got the proper file name for the real test later on.
25615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25616  if test "x$test_shortpath" = x; then
25617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25619    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25620  fi
25621
25622  # Call helper function which possibly converts this using DOS-style short mode.
25623  # If so, the updated path is stored in $new_path.
25624
25625  input_path="$new_path"
25626  # Check if we need to convert this using DOS-style short mode. If the path
25627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25628  # take no chances and rewrite it.
25629  # Note: m4 eats our [], so we need to use [ and ] instead.
25630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25631  if test "x$has_forbidden_chars" != x; then
25632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25636      # Going to short mode and back again did indeed matter. Since short mode is
25637      # case insensitive, let's make it lowercase to improve readability.
25638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25639      # Now convert it back to Unix-style (cygpath)
25640      input_path=`$CYGPATH -u "$shortmode_path"`
25641      new_path="$input_path"
25642    fi
25643  fi
25644
25645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25646  if test "x$test_cygdrive_prefix" = x; then
25647    # As a simple fix, exclude /usr/bin since it's not a real path.
25648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25650      # a path prefixed by /cygdrive for fixpath to work.
25651      new_path="$CYGWIN_ROOT_PATH$input_path"
25652    fi
25653  fi
25654
25655
25656  if test "x$path" != "x$new_path"; then
25657    BOOT_JDK="$new_path"
25658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25660  fi
25661
25662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25663
25664  path="$BOOT_JDK"
25665  has_colon=`$ECHO $path | $GREP ^.:`
25666  new_path="$path"
25667  if test "x$has_colon" = x; then
25668    # Not in mixed or Windows style, start by that.
25669    new_path=`cmd //c echo $path`
25670  fi
25671
25672
25673  input_path="$new_path"
25674  # Check if we need to convert this using DOS-style short mode. If the path
25675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25676  # take no chances and rewrite it.
25677  # Note: m4 eats our [], so we need to use [ and ] instead.
25678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25679  if test "x$has_forbidden_chars" != x; then
25680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25682  fi
25683
25684
25685  windows_path="$new_path"
25686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25687    unix_path=`$CYGPATH -u "$windows_path"`
25688    new_path="$unix_path"
25689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25691    new_path="$unix_path"
25692  fi
25693
25694  if test "x$path" != "x$new_path"; then
25695    BOOT_JDK="$new_path"
25696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25698  fi
25699
25700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25702
25703    else
25704      # We're on a unix platform. Hooray! :)
25705      path="$BOOT_JDK"
25706      has_space=`$ECHO "$path" | $GREP " "`
25707      if test "x$has_space" != x; then
25708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25709$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25710        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25711      fi
25712
25713      # Use eval to expand a potential ~
25714      eval path="$path"
25715      if test ! -f "$path" && test ! -d "$path"; then
25716        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25717      fi
25718
25719      if test -d "$path"; then
25720        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25721      else
25722        dir="`$DIRNAME "$path"`"
25723        base="`$BASENAME "$path"`"
25724        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25725      fi
25726    fi
25727  fi
25728
25729            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25730$as_echo_n "checking for Boot JDK... " >&6; }
25731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25732$as_echo "$BOOT_JDK" >&6; }
25733            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25734$as_echo_n "checking Boot JDK version... " >&6; }
25735            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25737$as_echo "$BOOT_JDK_VERSION" >&6; }
25738          fi # end check jdk version
25739        fi # end check javac
25740      fi # end check java
25741    fi # end check boot jdk found
25742  fi
25743
25744  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25745    # Having specified an argument which is incorrect will produce an instant failure;
25746    # we should not go on looking
25747    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25748  fi
25749
25750  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25751
25752  if test "x$BOOT_JDK_FOUND" = xno; then
25753    # Now execute the test
25754
25755  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25756    # First check at user selected default
25757
25758  if test "x$BOOT_JDK_FOUND" = xno; then
25759    # Now execute the test
25760
25761  if test -x /usr/libexec/java_home; then
25762    BOOT_JDK=`/usr/libexec/java_home `
25763    BOOT_JDK_FOUND=maybe
25764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25765$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25766  fi
25767
25768
25769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25771      # Do we have a bin/java?
25772      if test ! -x "$BOOT_JDK/bin/java"; then
25773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25775        BOOT_JDK_FOUND=no
25776      else
25777        # Do we have a bin/javac?
25778        if test ! -x "$BOOT_JDK/bin/javac"; then
25779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25783          BOOT_JDK_FOUND=no
25784        else
25785          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25786          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25787
25788          # Extra M4 quote needed to protect [] in grep expression.
25789          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25790          if test "x$FOUND_CORRECT_VERSION" = x; then
25791            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25793            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25794$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25795            BOOT_JDK_FOUND=no
25796          else
25797            # We're done! :-)
25798            BOOT_JDK_FOUND=yes
25799
25800  # Only process if variable expands to non-empty
25801
25802  if test "x$BOOT_JDK" != x; then
25803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25804
25805  # Input might be given as Windows format, start by converting to
25806  # unix format.
25807  path="$BOOT_JDK"
25808  new_path=`$CYGPATH -u "$path"`
25809
25810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25813  # "foo.exe" is OK but "foo" is an error.
25814  #
25815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25816  # It is also a way to make sure we got the proper file name for the real test later on.
25817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25818  if test "x$test_shortpath" = x; then
25819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25821    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25822  fi
25823
25824  # Call helper function which possibly converts this using DOS-style short mode.
25825  # If so, the updated path is stored in $new_path.
25826
25827  input_path="$new_path"
25828  # Check if we need to convert this using DOS-style short mode. If the path
25829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25830  # take no chances and rewrite it.
25831  # Note: m4 eats our [], so we need to use [ and ] instead.
25832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25833  if test "x$has_forbidden_chars" != x; then
25834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25838      # Going to short mode and back again did indeed matter. Since short mode is
25839      # case insensitive, let's make it lowercase to improve readability.
25840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25841      # Now convert it back to Unix-style (cygpath)
25842      input_path=`$CYGPATH -u "$shortmode_path"`
25843      new_path="$input_path"
25844    fi
25845  fi
25846
25847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25848  if test "x$test_cygdrive_prefix" = x; then
25849    # As a simple fix, exclude /usr/bin since it's not a real path.
25850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25852      # a path prefixed by /cygdrive for fixpath to work.
25853      new_path="$CYGWIN_ROOT_PATH$input_path"
25854    fi
25855  fi
25856
25857
25858  if test "x$path" != "x$new_path"; then
25859    BOOT_JDK="$new_path"
25860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25862  fi
25863
25864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25865
25866  path="$BOOT_JDK"
25867  has_colon=`$ECHO $path | $GREP ^.:`
25868  new_path="$path"
25869  if test "x$has_colon" = x; then
25870    # Not in mixed or Windows style, start by that.
25871    new_path=`cmd //c echo $path`
25872  fi
25873
25874
25875  input_path="$new_path"
25876  # Check if we need to convert this using DOS-style short mode. If the path
25877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25878  # take no chances and rewrite it.
25879  # Note: m4 eats our [], so we need to use [ and ] instead.
25880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25881  if test "x$has_forbidden_chars" != x; then
25882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25884  fi
25885
25886
25887  windows_path="$new_path"
25888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25889    unix_path=`$CYGPATH -u "$windows_path"`
25890    new_path="$unix_path"
25891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25893    new_path="$unix_path"
25894  fi
25895
25896  if test "x$path" != "x$new_path"; then
25897    BOOT_JDK="$new_path"
25898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25900  fi
25901
25902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25904
25905    else
25906      # We're on a unix platform. Hooray! :)
25907      path="$BOOT_JDK"
25908      has_space=`$ECHO "$path" | $GREP " "`
25909      if test "x$has_space" != x; then
25910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25913      fi
25914
25915      # Use eval to expand a potential ~
25916      eval path="$path"
25917      if test ! -f "$path" && test ! -d "$path"; then
25918        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25919      fi
25920
25921      if test -d "$path"; then
25922        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25923      else
25924        dir="`$DIRNAME "$path"`"
25925        base="`$BASENAME "$path"`"
25926        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25927      fi
25928    fi
25929  fi
25930
25931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25932$as_echo_n "checking for Boot JDK... " >&6; }
25933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25934$as_echo "$BOOT_JDK" >&6; }
25935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25936$as_echo_n "checking Boot JDK version... " >&6; }
25937            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25939$as_echo "$BOOT_JDK_VERSION" >&6; }
25940          fi # end check jdk version
25941        fi # end check javac
25942      fi # end check java
25943    fi # end check boot jdk found
25944  fi
25945
25946    # If that did not work out (e.g. too old), try explicit versions instead
25947
25948  if test "x$BOOT_JDK_FOUND" = xno; then
25949    # Now execute the test
25950
25951  if test -x /usr/libexec/java_home; then
25952    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25953    BOOT_JDK_FOUND=maybe
25954    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25955$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25956  fi
25957
25958
25959    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25960    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25961      # Do we have a bin/java?
25962      if test ! -x "$BOOT_JDK/bin/java"; then
25963        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25965        BOOT_JDK_FOUND=no
25966      else
25967        # Do we have a bin/javac?
25968        if test ! -x "$BOOT_JDK/bin/javac"; then
25969          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25971          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25972$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25973          BOOT_JDK_FOUND=no
25974        else
25975          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25976          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25977
25978          # Extra M4 quote needed to protect [] in grep expression.
25979          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25980          if test "x$FOUND_CORRECT_VERSION" = x; then
25981            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25983            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25984$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25985            BOOT_JDK_FOUND=no
25986          else
25987            # We're done! :-)
25988            BOOT_JDK_FOUND=yes
25989
25990  # Only process if variable expands to non-empty
25991
25992  if test "x$BOOT_JDK" != x; then
25993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25994
25995  # Input might be given as Windows format, start by converting to
25996  # unix format.
25997  path="$BOOT_JDK"
25998  new_path=`$CYGPATH -u "$path"`
25999
26000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26003  # "foo.exe" is OK but "foo" is an error.
26004  #
26005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26006  # It is also a way to make sure we got the proper file name for the real test later on.
26007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26008  if test "x$test_shortpath" = x; then
26009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26012  fi
26013
26014  # Call helper function which possibly converts this using DOS-style short mode.
26015  # If so, the updated path is stored in $new_path.
26016
26017  input_path="$new_path"
26018  # Check if we need to convert this using DOS-style short mode. If the path
26019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26020  # take no chances and rewrite it.
26021  # Note: m4 eats our [], so we need to use [ and ] instead.
26022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26023  if test "x$has_forbidden_chars" != x; then
26024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26028      # Going to short mode and back again did indeed matter. Since short mode is
26029      # case insensitive, let's make it lowercase to improve readability.
26030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26031      # Now convert it back to Unix-style (cygpath)
26032      input_path=`$CYGPATH -u "$shortmode_path"`
26033      new_path="$input_path"
26034    fi
26035  fi
26036
26037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26038  if test "x$test_cygdrive_prefix" = x; then
26039    # As a simple fix, exclude /usr/bin since it's not a real path.
26040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26042      # a path prefixed by /cygdrive for fixpath to work.
26043      new_path="$CYGWIN_ROOT_PATH$input_path"
26044    fi
26045  fi
26046
26047
26048  if test "x$path" != "x$new_path"; then
26049    BOOT_JDK="$new_path"
26050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26052  fi
26053
26054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26055
26056  path="$BOOT_JDK"
26057  has_colon=`$ECHO $path | $GREP ^.:`
26058  new_path="$path"
26059  if test "x$has_colon" = x; then
26060    # Not in mixed or Windows style, start by that.
26061    new_path=`cmd //c echo $path`
26062  fi
26063
26064
26065  input_path="$new_path"
26066  # Check if we need to convert this using DOS-style short mode. If the path
26067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26068  # take no chances and rewrite it.
26069  # Note: m4 eats our [], so we need to use [ and ] instead.
26070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26071  if test "x$has_forbidden_chars" != x; then
26072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26074  fi
26075
26076
26077  windows_path="$new_path"
26078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26079    unix_path=`$CYGPATH -u "$windows_path"`
26080    new_path="$unix_path"
26081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26083    new_path="$unix_path"
26084  fi
26085
26086  if test "x$path" != "x$new_path"; then
26087    BOOT_JDK="$new_path"
26088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26090  fi
26091
26092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26094
26095    else
26096      # We're on a unix platform. Hooray! :)
26097      path="$BOOT_JDK"
26098      has_space=`$ECHO "$path" | $GREP " "`
26099      if test "x$has_space" != x; then
26100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26102        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26103      fi
26104
26105      # Use eval to expand a potential ~
26106      eval path="$path"
26107      if test ! -f "$path" && test ! -d "$path"; then
26108        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26109      fi
26110
26111      if test -d "$path"; then
26112        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26113      else
26114        dir="`$DIRNAME "$path"`"
26115        base="`$BASENAME "$path"`"
26116        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26117      fi
26118    fi
26119  fi
26120
26121            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26122$as_echo_n "checking for Boot JDK... " >&6; }
26123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26124$as_echo "$BOOT_JDK" >&6; }
26125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26126$as_echo_n "checking Boot JDK version... " >&6; }
26127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26129$as_echo "$BOOT_JDK_VERSION" >&6; }
26130          fi # end check jdk version
26131        fi # end check javac
26132      fi # end check java
26133    fi # end check boot jdk found
26134  fi
26135
26136
26137  if test "x$BOOT_JDK_FOUND" = xno; then
26138    # Now execute the test
26139
26140  if test -x /usr/libexec/java_home; then
26141    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26142    BOOT_JDK_FOUND=maybe
26143    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26144$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26145  fi
26146
26147
26148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26150      # Do we have a bin/java?
26151      if test ! -x "$BOOT_JDK/bin/java"; then
26152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26154        BOOT_JDK_FOUND=no
26155      else
26156        # Do we have a bin/javac?
26157        if test ! -x "$BOOT_JDK/bin/javac"; then
26158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26162          BOOT_JDK_FOUND=no
26163        else
26164          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26165          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26166
26167          # Extra M4 quote needed to protect [] in grep expression.
26168          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26169          if test "x$FOUND_CORRECT_VERSION" = x; then
26170            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26172            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26173$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26174            BOOT_JDK_FOUND=no
26175          else
26176            # We're done! :-)
26177            BOOT_JDK_FOUND=yes
26178
26179  # Only process if variable expands to non-empty
26180
26181  if test "x$BOOT_JDK" != x; then
26182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26183
26184  # Input might be given as Windows format, start by converting to
26185  # unix format.
26186  path="$BOOT_JDK"
26187  new_path=`$CYGPATH -u "$path"`
26188
26189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26192  # "foo.exe" is OK but "foo" is an error.
26193  #
26194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26195  # It is also a way to make sure we got the proper file name for the real test later on.
26196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26197  if test "x$test_shortpath" = x; then
26198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26201  fi
26202
26203  # Call helper function which possibly converts this using DOS-style short mode.
26204  # If so, the updated path is stored in $new_path.
26205
26206  input_path="$new_path"
26207  # Check if we need to convert this using DOS-style short mode. If the path
26208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26209  # take no chances and rewrite it.
26210  # Note: m4 eats our [], so we need to use [ and ] instead.
26211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26212  if test "x$has_forbidden_chars" != x; then
26213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26217      # Going to short mode and back again did indeed matter. Since short mode is
26218      # case insensitive, let's make it lowercase to improve readability.
26219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26220      # Now convert it back to Unix-style (cygpath)
26221      input_path=`$CYGPATH -u "$shortmode_path"`
26222      new_path="$input_path"
26223    fi
26224  fi
26225
26226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26227  if test "x$test_cygdrive_prefix" = x; then
26228    # As a simple fix, exclude /usr/bin since it's not a real path.
26229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26231      # a path prefixed by /cygdrive for fixpath to work.
26232      new_path="$CYGWIN_ROOT_PATH$input_path"
26233    fi
26234  fi
26235
26236
26237  if test "x$path" != "x$new_path"; then
26238    BOOT_JDK="$new_path"
26239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26241  fi
26242
26243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26244
26245  path="$BOOT_JDK"
26246  has_colon=`$ECHO $path | $GREP ^.:`
26247  new_path="$path"
26248  if test "x$has_colon" = x; then
26249    # Not in mixed or Windows style, start by that.
26250    new_path=`cmd //c echo $path`
26251  fi
26252
26253
26254  input_path="$new_path"
26255  # Check if we need to convert this using DOS-style short mode. If the path
26256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26257  # take no chances and rewrite it.
26258  # Note: m4 eats our [], so we need to use [ and ] instead.
26259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26260  if test "x$has_forbidden_chars" != x; then
26261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26263  fi
26264
26265
26266  windows_path="$new_path"
26267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26268    unix_path=`$CYGPATH -u "$windows_path"`
26269    new_path="$unix_path"
26270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26272    new_path="$unix_path"
26273  fi
26274
26275  if test "x$path" != "x$new_path"; then
26276    BOOT_JDK="$new_path"
26277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26279  fi
26280
26281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26283
26284    else
26285      # We're on a unix platform. Hooray! :)
26286      path="$BOOT_JDK"
26287      has_space=`$ECHO "$path" | $GREP " "`
26288      if test "x$has_space" != x; then
26289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26292      fi
26293
26294      # Use eval to expand a potential ~
26295      eval path="$path"
26296      if test ! -f "$path" && test ! -d "$path"; then
26297        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26298      fi
26299
26300      if test -d "$path"; then
26301        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26302      else
26303        dir="`$DIRNAME "$path"`"
26304        base="`$BASENAME "$path"`"
26305        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26306      fi
26307    fi
26308  fi
26309
26310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26311$as_echo_n "checking for Boot JDK... " >&6; }
26312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26313$as_echo "$BOOT_JDK" >&6; }
26314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26315$as_echo_n "checking Boot JDK version... " >&6; }
26316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26318$as_echo "$BOOT_JDK_VERSION" >&6; }
26319          fi # end check jdk version
26320        fi # end check javac
26321      fi # end check java
26322    fi # end check boot jdk found
26323  fi
26324
26325
26326  if test "x$BOOT_JDK_FOUND" = xno; then
26327    # Now execute the test
26328
26329  if test -x /usr/libexec/java_home; then
26330    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26331    BOOT_JDK_FOUND=maybe
26332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26333$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26334  fi
26335
26336
26337    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26338    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26339      # Do we have a bin/java?
26340      if test ! -x "$BOOT_JDK/bin/java"; then
26341        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26343        BOOT_JDK_FOUND=no
26344      else
26345        # Do we have a bin/javac?
26346        if test ! -x "$BOOT_JDK/bin/javac"; then
26347          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26349          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26350$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26351          BOOT_JDK_FOUND=no
26352        else
26353          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26354          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26355
26356          # Extra M4 quote needed to protect [] in grep expression.
26357          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26358          if test "x$FOUND_CORRECT_VERSION" = x; then
26359            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26361            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26362$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26363            BOOT_JDK_FOUND=no
26364          else
26365            # We're done! :-)
26366            BOOT_JDK_FOUND=yes
26367
26368  # Only process if variable expands to non-empty
26369
26370  if test "x$BOOT_JDK" != x; then
26371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26372
26373  # Input might be given as Windows format, start by converting to
26374  # unix format.
26375  path="$BOOT_JDK"
26376  new_path=`$CYGPATH -u "$path"`
26377
26378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26381  # "foo.exe" is OK but "foo" is an error.
26382  #
26383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26384  # It is also a way to make sure we got the proper file name for the real test later on.
26385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26386  if test "x$test_shortpath" = x; then
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26389    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26390  fi
26391
26392  # Call helper function which possibly converts this using DOS-style short mode.
26393  # If so, the updated path is stored in $new_path.
26394
26395  input_path="$new_path"
26396  # Check if we need to convert this using DOS-style short mode. If the path
26397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26398  # take no chances and rewrite it.
26399  # Note: m4 eats our [], so we need to use [ and ] instead.
26400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26401  if test "x$has_forbidden_chars" != x; then
26402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26406      # Going to short mode and back again did indeed matter. Since short mode is
26407      # case insensitive, let's make it lowercase to improve readability.
26408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26409      # Now convert it back to Unix-style (cygpath)
26410      input_path=`$CYGPATH -u "$shortmode_path"`
26411      new_path="$input_path"
26412    fi
26413  fi
26414
26415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26416  if test "x$test_cygdrive_prefix" = x; then
26417    # As a simple fix, exclude /usr/bin since it's not a real path.
26418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26420      # a path prefixed by /cygdrive for fixpath to work.
26421      new_path="$CYGWIN_ROOT_PATH$input_path"
26422    fi
26423  fi
26424
26425
26426  if test "x$path" != "x$new_path"; then
26427    BOOT_JDK="$new_path"
26428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26429$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26430  fi
26431
26432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26433
26434  path="$BOOT_JDK"
26435  has_colon=`$ECHO $path | $GREP ^.:`
26436  new_path="$path"
26437  if test "x$has_colon" = x; then
26438    # Not in mixed or Windows style, start by that.
26439    new_path=`cmd //c echo $path`
26440  fi
26441
26442
26443  input_path="$new_path"
26444  # Check if we need to convert this using DOS-style short mode. If the path
26445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26446  # take no chances and rewrite it.
26447  # Note: m4 eats our [], so we need to use [ and ] instead.
26448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26449  if test "x$has_forbidden_chars" != x; then
26450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26452  fi
26453
26454
26455  windows_path="$new_path"
26456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26457    unix_path=`$CYGPATH -u "$windows_path"`
26458    new_path="$unix_path"
26459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26461    new_path="$unix_path"
26462  fi
26463
26464  if test "x$path" != "x$new_path"; then
26465    BOOT_JDK="$new_path"
26466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26468  fi
26469
26470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26472
26473    else
26474      # We're on a unix platform. Hooray! :)
26475      path="$BOOT_JDK"
26476      has_space=`$ECHO "$path" | $GREP " "`
26477      if test "x$has_space" != x; then
26478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26479$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26480        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26481      fi
26482
26483      # Use eval to expand a potential ~
26484      eval path="$path"
26485      if test ! -f "$path" && test ! -d "$path"; then
26486        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26487      fi
26488
26489      if test -d "$path"; then
26490        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26491      else
26492        dir="`$DIRNAME "$path"`"
26493        base="`$BASENAME "$path"`"
26494        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26495      fi
26496    fi
26497  fi
26498
26499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26500$as_echo_n "checking for Boot JDK... " >&6; }
26501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26502$as_echo "$BOOT_JDK" >&6; }
26503            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26504$as_echo_n "checking Boot JDK version... " >&6; }
26505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26507$as_echo "$BOOT_JDK_VERSION" >&6; }
26508          fi # end check jdk version
26509        fi # end check javac
26510      fi # end check java
26511    fi # end check boot jdk found
26512  fi
26513
26514  fi
26515
26516
26517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26519      # Do we have a bin/java?
26520      if test ! -x "$BOOT_JDK/bin/java"; then
26521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26523        BOOT_JDK_FOUND=no
26524      else
26525        # Do we have a bin/javac?
26526        if test ! -x "$BOOT_JDK/bin/javac"; then
26527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26531          BOOT_JDK_FOUND=no
26532        else
26533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26535
26536          # Extra M4 quote needed to protect [] in grep expression.
26537          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26538          if test "x$FOUND_CORRECT_VERSION" = x; then
26539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26543            BOOT_JDK_FOUND=no
26544          else
26545            # We're done! :-)
26546            BOOT_JDK_FOUND=yes
26547
26548  # Only process if variable expands to non-empty
26549
26550  if test "x$BOOT_JDK" != x; then
26551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26552
26553  # Input might be given as Windows format, start by converting to
26554  # unix format.
26555  path="$BOOT_JDK"
26556  new_path=`$CYGPATH -u "$path"`
26557
26558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26561  # "foo.exe" is OK but "foo" is an error.
26562  #
26563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26564  # It is also a way to make sure we got the proper file name for the real test later on.
26565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26566  if test "x$test_shortpath" = x; then
26567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26570  fi
26571
26572  # Call helper function which possibly converts this using DOS-style short mode.
26573  # If so, the updated path is stored in $new_path.
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26586      # Going to short mode and back again did indeed matter. Since short mode is
26587      # case insensitive, let's make it lowercase to improve readability.
26588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26589      # Now convert it back to Unix-style (cygpath)
26590      input_path=`$CYGPATH -u "$shortmode_path"`
26591      new_path="$input_path"
26592    fi
26593  fi
26594
26595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26596  if test "x$test_cygdrive_prefix" = x; then
26597    # As a simple fix, exclude /usr/bin since it's not a real path.
26598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26600      # a path prefixed by /cygdrive for fixpath to work.
26601      new_path="$CYGWIN_ROOT_PATH$input_path"
26602    fi
26603  fi
26604
26605
26606  if test "x$path" != "x$new_path"; then
26607    BOOT_JDK="$new_path"
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26610  fi
26611
26612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26613
26614  path="$BOOT_JDK"
26615  has_colon=`$ECHO $path | $GREP ^.:`
26616  new_path="$path"
26617  if test "x$has_colon" = x; then
26618    # Not in mixed or Windows style, start by that.
26619    new_path=`cmd //c echo $path`
26620  fi
26621
26622
26623  input_path="$new_path"
26624  # Check if we need to convert this using DOS-style short mode. If the path
26625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26626  # take no chances and rewrite it.
26627  # Note: m4 eats our [], so we need to use [ and ] instead.
26628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26629  if test "x$has_forbidden_chars" != x; then
26630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26632  fi
26633
26634
26635  windows_path="$new_path"
26636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26637    unix_path=`$CYGPATH -u "$windows_path"`
26638    new_path="$unix_path"
26639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26641    new_path="$unix_path"
26642  fi
26643
26644  if test "x$path" != "x$new_path"; then
26645    BOOT_JDK="$new_path"
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26648  fi
26649
26650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26652
26653    else
26654      # We're on a unix platform. Hooray! :)
26655      path="$BOOT_JDK"
26656      has_space=`$ECHO "$path" | $GREP " "`
26657      if test "x$has_space" != x; then
26658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26661      fi
26662
26663      # Use eval to expand a potential ~
26664      eval path="$path"
26665      if test ! -f "$path" && test ! -d "$path"; then
26666        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26667      fi
26668
26669      if test -d "$path"; then
26670        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26671      else
26672        dir="`$DIRNAME "$path"`"
26673        base="`$BASENAME "$path"`"
26674        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26675      fi
26676    fi
26677  fi
26678
26679            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26680$as_echo_n "checking for Boot JDK... " >&6; }
26681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26682$as_echo "$BOOT_JDK" >&6; }
26683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26684$as_echo_n "checking Boot JDK version... " >&6; }
26685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26687$as_echo "$BOOT_JDK_VERSION" >&6; }
26688          fi # end check jdk version
26689        fi # end check javac
26690      fi # end check java
26691    fi # end check boot jdk found
26692  fi
26693
26694
26695  # Test: Is $JAVA_HOME set?
26696
26697  if test "x$BOOT_JDK_FOUND" = xno; then
26698    # Now execute the test
26699
26700  if test "x$JAVA_HOME" != x; then
26701    JAVA_HOME_PROCESSED="$JAVA_HOME"
26702
26703  # Only process if variable expands to non-empty
26704
26705  if test "x$JAVA_HOME_PROCESSED" != x; then
26706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26707
26708  # Input might be given as Windows format, start by converting to
26709  # unix format.
26710  path="$JAVA_HOME_PROCESSED"
26711  new_path=`$CYGPATH -u "$path"`
26712
26713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26716  # "foo.exe" is OK but "foo" is an error.
26717  #
26718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26719  # It is also a way to make sure we got the proper file name for the real test later on.
26720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26721  if test "x$test_shortpath" = x; then
26722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26723$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26724    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26725  fi
26726
26727  # Call helper function which possibly converts this using DOS-style short mode.
26728  # If so, the updated path is stored in $new_path.
26729
26730  input_path="$new_path"
26731  # Check if we need to convert this using DOS-style short mode. If the path
26732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26733  # take no chances and rewrite it.
26734  # Note: m4 eats our [], so we need to use [ and ] instead.
26735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26736  if test "x$has_forbidden_chars" != x; then
26737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26741      # Going to short mode and back again did indeed matter. Since short mode is
26742      # case insensitive, let's make it lowercase to improve readability.
26743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26744      # Now convert it back to Unix-style (cygpath)
26745      input_path=`$CYGPATH -u "$shortmode_path"`
26746      new_path="$input_path"
26747    fi
26748  fi
26749
26750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26751  if test "x$test_cygdrive_prefix" = x; then
26752    # As a simple fix, exclude /usr/bin since it's not a real path.
26753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26755      # a path prefixed by /cygdrive for fixpath to work.
26756      new_path="$CYGWIN_ROOT_PATH$input_path"
26757    fi
26758  fi
26759
26760
26761  if test "x$path" != "x$new_path"; then
26762    JAVA_HOME_PROCESSED="$new_path"
26763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26764$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26765  fi
26766
26767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26768
26769  path="$JAVA_HOME_PROCESSED"
26770  has_colon=`$ECHO $path | $GREP ^.:`
26771  new_path="$path"
26772  if test "x$has_colon" = x; then
26773    # Not in mixed or Windows style, start by that.
26774    new_path=`cmd //c echo $path`
26775  fi
26776
26777
26778  input_path="$new_path"
26779  # Check if we need to convert this using DOS-style short mode. If the path
26780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26781  # take no chances and rewrite it.
26782  # Note: m4 eats our [], so we need to use [ and ] instead.
26783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26784  if test "x$has_forbidden_chars" != x; then
26785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26787  fi
26788
26789
26790  windows_path="$new_path"
26791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26792    unix_path=`$CYGPATH -u "$windows_path"`
26793    new_path="$unix_path"
26794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26796    new_path="$unix_path"
26797  fi
26798
26799  if test "x$path" != "x$new_path"; then
26800    JAVA_HOME_PROCESSED="$new_path"
26801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26802$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26803  fi
26804
26805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26807
26808    else
26809      # We're on a unix platform. Hooray! :)
26810      path="$JAVA_HOME_PROCESSED"
26811      has_space=`$ECHO "$path" | $GREP " "`
26812      if test "x$has_space" != x; then
26813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26814$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26816      fi
26817
26818      # Use eval to expand a potential ~
26819      eval path="$path"
26820      if test ! -f "$path" && test ! -d "$path"; then
26821        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26822      fi
26823
26824      if test -d "$path"; then
26825        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26826      else
26827        dir="`$DIRNAME "$path"`"
26828        base="`$BASENAME "$path"`"
26829        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26830      fi
26831    fi
26832  fi
26833
26834    if test ! -d "$JAVA_HOME_PROCESSED"; then
26835      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26836$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26837    else
26838      # Aha, the user has set a JAVA_HOME
26839      # let us use that as the Boot JDK.
26840      BOOT_JDK="$JAVA_HOME_PROCESSED"
26841      BOOT_JDK_FOUND=maybe
26842      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26843$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26844    fi
26845  fi
26846
26847
26848    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26849    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26850      # Do we have a bin/java?
26851      if test ! -x "$BOOT_JDK/bin/java"; then
26852        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26854        BOOT_JDK_FOUND=no
26855      else
26856        # Do we have a bin/javac?
26857        if test ! -x "$BOOT_JDK/bin/javac"; then
26858          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26860          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26861$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26862          BOOT_JDK_FOUND=no
26863        else
26864          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26865          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26866
26867          # Extra M4 quote needed to protect [] in grep expression.
26868          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26869          if test "x$FOUND_CORRECT_VERSION" = x; then
26870            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26872            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26873$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26874            BOOT_JDK_FOUND=no
26875          else
26876            # We're done! :-)
26877            BOOT_JDK_FOUND=yes
26878
26879  # Only process if variable expands to non-empty
26880
26881  if test "x$BOOT_JDK" != x; then
26882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26883
26884  # Input might be given as Windows format, start by converting to
26885  # unix format.
26886  path="$BOOT_JDK"
26887  new_path=`$CYGPATH -u "$path"`
26888
26889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26892  # "foo.exe" is OK but "foo" is an error.
26893  #
26894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26895  # It is also a way to make sure we got the proper file name for the real test later on.
26896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26897  if test "x$test_shortpath" = x; then
26898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26899$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26900    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26901  fi
26902
26903  # Call helper function which possibly converts this using DOS-style short mode.
26904  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26917      # Going to short mode and back again did indeed matter. Since short mode is
26918      # case insensitive, let's make it lowercase to improve readability.
26919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26920      # Now convert it back to Unix-style (cygpath)
26921      input_path=`$CYGPATH -u "$shortmode_path"`
26922      new_path="$input_path"
26923    fi
26924  fi
26925
26926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26927  if test "x$test_cygdrive_prefix" = x; then
26928    # As a simple fix, exclude /usr/bin since it's not a real path.
26929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26931      # a path prefixed by /cygdrive for fixpath to work.
26932      new_path="$CYGWIN_ROOT_PATH$input_path"
26933    fi
26934  fi
26935
26936
26937  if test "x$path" != "x$new_path"; then
26938    BOOT_JDK="$new_path"
26939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26940$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26941  fi
26942
26943    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26944
26945  path="$BOOT_JDK"
26946  has_colon=`$ECHO $path | $GREP ^.:`
26947  new_path="$path"
26948  if test "x$has_colon" = x; then
26949    # Not in mixed or Windows style, start by that.
26950    new_path=`cmd //c echo $path`
26951  fi
26952
26953
26954  input_path="$new_path"
26955  # Check if we need to convert this using DOS-style short mode. If the path
26956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26957  # take no chances and rewrite it.
26958  # Note: m4 eats our [], so we need to use [ and ] instead.
26959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26960  if test "x$has_forbidden_chars" != x; then
26961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26963  fi
26964
26965
26966  windows_path="$new_path"
26967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968    unix_path=`$CYGPATH -u "$windows_path"`
26969    new_path="$unix_path"
26970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26972    new_path="$unix_path"
26973  fi
26974
26975  if test "x$path" != "x$new_path"; then
26976    BOOT_JDK="$new_path"
26977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26979  fi
26980
26981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26983
26984    else
26985      # We're on a unix platform. Hooray! :)
26986      path="$BOOT_JDK"
26987      has_space=`$ECHO "$path" | $GREP " "`
26988      if test "x$has_space" != x; then
26989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26991        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26992      fi
26993
26994      # Use eval to expand a potential ~
26995      eval path="$path"
26996      if test ! -f "$path" && test ! -d "$path"; then
26997        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26998      fi
26999
27000      if test -d "$path"; then
27001        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27002      else
27003        dir="`$DIRNAME "$path"`"
27004        base="`$BASENAME "$path"`"
27005        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27006      fi
27007    fi
27008  fi
27009
27010            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27011$as_echo_n "checking for Boot JDK... " >&6; }
27012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27013$as_echo "$BOOT_JDK" >&6; }
27014            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27015$as_echo_n "checking Boot JDK version... " >&6; }
27016            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27018$as_echo "$BOOT_JDK_VERSION" >&6; }
27019          fi # end check jdk version
27020        fi # end check javac
27021      fi # end check java
27022    fi # end check boot jdk found
27023  fi
27024
27025
27026  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27027
27028  if test "x$BOOT_JDK_FOUND" = xno; then
27029    # Now execute the test
27030
27031  # Extract the first word of "javac", so it can be a program name with args.
27032set dummy javac; ac_word=$2
27033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27034$as_echo_n "checking for $ac_word... " >&6; }
27035if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27036  $as_echo_n "(cached) " >&6
27037else
27038  case $JAVAC_CHECK in
27039  [\\/]* | ?:[\\/]*)
27040  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27041  ;;
27042  *)
27043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27044for as_dir in $PATH
27045do
27046  IFS=$as_save_IFS
27047  test -z "$as_dir" && as_dir=.
27048    for ac_exec_ext in '' $ac_executable_extensions; do
27049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27050    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27052    break 2
27053  fi
27054done
27055  done
27056IFS=$as_save_IFS
27057
27058  ;;
27059esac
27060fi
27061JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27062if test -n "$JAVAC_CHECK"; then
27063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27064$as_echo "$JAVAC_CHECK" >&6; }
27065else
27066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27067$as_echo "no" >&6; }
27068fi
27069
27070
27071  # Extract the first word of "java", so it can be a program name with args.
27072set dummy java; ac_word=$2
27073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27074$as_echo_n "checking for $ac_word... " >&6; }
27075if ${ac_cv_path_JAVA_CHECK+:} false; then :
27076  $as_echo_n "(cached) " >&6
27077else
27078  case $JAVA_CHECK in
27079  [\\/]* | ?:[\\/]*)
27080  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27081  ;;
27082  *)
27083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27084for as_dir in $PATH
27085do
27086  IFS=$as_save_IFS
27087  test -z "$as_dir" && as_dir=.
27088    for ac_exec_ext in '' $ac_executable_extensions; do
27089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27090    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27092    break 2
27093  fi
27094done
27095  done
27096IFS=$as_save_IFS
27097
27098  ;;
27099esac
27100fi
27101JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27102if test -n "$JAVA_CHECK"; then
27103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27104$as_echo "$JAVA_CHECK" >&6; }
27105else
27106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27107$as_echo "no" >&6; }
27108fi
27109
27110
27111  BINARY="$JAVAC_CHECK"
27112  if test "x$JAVAC_CHECK" = x; then
27113    BINARY="$JAVA_CHECK"
27114  fi
27115  if test "x$BINARY" != x; then
27116    # So there is a java(c) binary, it might be part of a JDK.
27117    # Lets find the JDK/JRE directory by following symbolic links.
27118    # Linux/GNU systems often have links from /usr/bin/java to
27119    # /etc/alternatives/java to the real JDK binary.
27120
27121  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27122    # Follow a chain of symbolic links. Use readlink
27123    # where it exists, else fall back to horribly
27124    # complicated shell code.
27125    if test "x$READLINK_TESTED" != yes; then
27126      # On MacOSX there is a readlink tool with a different
27127      # purpose than the GNU readlink tool. Check the found readlink.
27128      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27129      if test "x$ISGNU" = x; then
27130        # A readlink that we do not know how to use.
27131        # Are there other non-GNU readlinks out there?
27132        READLINK_TESTED=yes
27133        READLINK=
27134      fi
27135    fi
27136
27137    if test "x$READLINK" != x; then
27138      BINARY=`$READLINK -f $BINARY`
27139    else
27140      # Save the current directory for restoring afterwards
27141      STARTDIR=$PWD
27142      COUNTER=0
27143      sym_link_dir=`$DIRNAME $BINARY`
27144      sym_link_file=`$BASENAME $BINARY`
27145      cd $sym_link_dir
27146      # Use -P flag to resolve symlinks in directories.
27147      cd `$THEPWDCMD -P`
27148      sym_link_dir=`$THEPWDCMD -P`
27149      # Resolve file symlinks
27150      while test $COUNTER -lt 20; do
27151        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27152        if test "x$ISLINK" == x; then
27153          # This is not a symbolic link! We are done!
27154          break
27155        fi
27156        # Again resolve directory symlinks since the target of the just found
27157        # link could be in a different directory
27158        cd `$DIRNAME $ISLINK`
27159        sym_link_dir=`$THEPWDCMD -P`
27160        sym_link_file=`$BASENAME $ISLINK`
27161        let COUNTER=COUNTER+1
27162      done
27163      cd $STARTDIR
27164      BINARY=$sym_link_dir/$sym_link_file
27165    fi
27166  fi
27167
27168    BOOT_JDK=`dirname "$BINARY"`
27169    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27170    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27171      # Looks like we found ourselves an JDK
27172      BOOT_JDK_FOUND=maybe
27173      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27174$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27175    fi
27176  fi
27177
27178
27179    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27180    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27181      # Do we have a bin/java?
27182      if test ! -x "$BOOT_JDK/bin/java"; then
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27185        BOOT_JDK_FOUND=no
27186      else
27187        # Do we have a bin/javac?
27188        if test ! -x "$BOOT_JDK/bin/javac"; then
27189          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27191          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27192$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27193          BOOT_JDK_FOUND=no
27194        else
27195          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27196          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27197
27198          # Extra M4 quote needed to protect [] in grep expression.
27199          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27200          if test "x$FOUND_CORRECT_VERSION" = x; then
27201            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27203            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27204$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27205            BOOT_JDK_FOUND=no
27206          else
27207            # We're done! :-)
27208            BOOT_JDK_FOUND=yes
27209
27210  # Only process if variable expands to non-empty
27211
27212  if test "x$BOOT_JDK" != x; then
27213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27214
27215  # Input might be given as Windows format, start by converting to
27216  # unix format.
27217  path="$BOOT_JDK"
27218  new_path=`$CYGPATH -u "$path"`
27219
27220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27223  # "foo.exe" is OK but "foo" is an error.
27224  #
27225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27226  # It is also a way to make sure we got the proper file name for the real test later on.
27227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27228  if test "x$test_shortpath" = x; then
27229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27231    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27232  fi
27233
27234  # Call helper function which possibly converts this using DOS-style short mode.
27235  # If so, the updated path is stored in $new_path.
27236
27237  input_path="$new_path"
27238  # Check if we need to convert this using DOS-style short mode. If the path
27239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27240  # take no chances and rewrite it.
27241  # Note: m4 eats our [], so we need to use [ and ] instead.
27242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27243  if test "x$has_forbidden_chars" != x; then
27244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27248      # Going to short mode and back again did indeed matter. Since short mode is
27249      # case insensitive, let's make it lowercase to improve readability.
27250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27251      # Now convert it back to Unix-style (cygpath)
27252      input_path=`$CYGPATH -u "$shortmode_path"`
27253      new_path="$input_path"
27254    fi
27255  fi
27256
27257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27258  if test "x$test_cygdrive_prefix" = x; then
27259    # As a simple fix, exclude /usr/bin since it's not a real path.
27260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27262      # a path prefixed by /cygdrive for fixpath to work.
27263      new_path="$CYGWIN_ROOT_PATH$input_path"
27264    fi
27265  fi
27266
27267
27268  if test "x$path" != "x$new_path"; then
27269    BOOT_JDK="$new_path"
27270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27272  fi
27273
27274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27275
27276  path="$BOOT_JDK"
27277  has_colon=`$ECHO $path | $GREP ^.:`
27278  new_path="$path"
27279  if test "x$has_colon" = x; then
27280    # Not in mixed or Windows style, start by that.
27281    new_path=`cmd //c echo $path`
27282  fi
27283
27284
27285  input_path="$new_path"
27286  # Check if we need to convert this using DOS-style short mode. If the path
27287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27288  # take no chances and rewrite it.
27289  # Note: m4 eats our [], so we need to use [ and ] instead.
27290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27291  if test "x$has_forbidden_chars" != x; then
27292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27294  fi
27295
27296
27297  windows_path="$new_path"
27298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27299    unix_path=`$CYGPATH -u "$windows_path"`
27300    new_path="$unix_path"
27301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27303    new_path="$unix_path"
27304  fi
27305
27306  if test "x$path" != "x$new_path"; then
27307    BOOT_JDK="$new_path"
27308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27310  fi
27311
27312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27314
27315    else
27316      # We're on a unix platform. Hooray! :)
27317      path="$BOOT_JDK"
27318      has_space=`$ECHO "$path" | $GREP " "`
27319      if test "x$has_space" != x; then
27320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27322        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27323      fi
27324
27325      # Use eval to expand a potential ~
27326      eval path="$path"
27327      if test ! -f "$path" && test ! -d "$path"; then
27328        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27329      fi
27330
27331      if test -d "$path"; then
27332        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27333      else
27334        dir="`$DIRNAME "$path"`"
27335        base="`$BASENAME "$path"`"
27336        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27337      fi
27338    fi
27339  fi
27340
27341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27342$as_echo_n "checking for Boot JDK... " >&6; }
27343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27344$as_echo "$BOOT_JDK" >&6; }
27345            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27346$as_echo_n "checking Boot JDK version... " >&6; }
27347            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27349$as_echo "$BOOT_JDK_VERSION" >&6; }
27350          fi # end check jdk version
27351        fi # end check javac
27352      fi # end check java
27353    fi # end check boot jdk found
27354  fi
27355
27356
27357  # Test: Is there a JDK installed in default, well-known locations?
27358
27359  if test "x$BOOT_JDK_FOUND" = xno; then
27360    # Now execute the test
27361
27362  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27363
27364  if test "x$BOOT_JDK_FOUND" = xno; then
27365    # Now execute the test
27366
27367  if test "x$ProgramW6432" != x; then
27368    VIRTUAL_DIR="$ProgramW6432/Java"
27369
27370  windows_path="$VIRTUAL_DIR"
27371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27372    unix_path=`$CYGPATH -u "$windows_path"`
27373    VIRTUAL_DIR="$unix_path"
27374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27376    VIRTUAL_DIR="$unix_path"
27377  fi
27378
27379
27380  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27381  BOOT_JDK_SUFFIX=""
27382  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27383  if test "x$ALL_JDKS_FOUND" != x; then
27384    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27385
27386  if test "x$BOOT_JDK_FOUND" = xno; then
27387    # Now execute the test
27388
27389        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27390        if test -d "$BOOT_JDK"; then
27391          BOOT_JDK_FOUND=maybe
27392          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27393$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27394        fi
27395
27396
27397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27399      # Do we have a bin/java?
27400      if test ! -x "$BOOT_JDK/bin/java"; then
27401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27403        BOOT_JDK_FOUND=no
27404      else
27405        # Do we have a bin/javac?
27406        if test ! -x "$BOOT_JDK/bin/javac"; then
27407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27411          BOOT_JDK_FOUND=no
27412        else
27413          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27414          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27415
27416          # Extra M4 quote needed to protect [] in grep expression.
27417          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27418          if test "x$FOUND_CORRECT_VERSION" = x; then
27419            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27421            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27422$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27423            BOOT_JDK_FOUND=no
27424          else
27425            # We're done! :-)
27426            BOOT_JDK_FOUND=yes
27427
27428  # Only process if variable expands to non-empty
27429
27430  if test "x$BOOT_JDK" != x; then
27431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27432
27433  # Input might be given as Windows format, start by converting to
27434  # unix format.
27435  path="$BOOT_JDK"
27436  new_path=`$CYGPATH -u "$path"`
27437
27438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27441  # "foo.exe" is OK but "foo" is an error.
27442  #
27443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27444  # It is also a way to make sure we got the proper file name for the real test later on.
27445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27446  if test "x$test_shortpath" = x; then
27447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27450  fi
27451
27452  # Call helper function which possibly converts this using DOS-style short mode.
27453  # If so, the updated path is stored in $new_path.
27454
27455  input_path="$new_path"
27456  # Check if we need to convert this using DOS-style short mode. If the path
27457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27458  # take no chances and rewrite it.
27459  # Note: m4 eats our [], so we need to use [ and ] instead.
27460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27461  if test "x$has_forbidden_chars" != x; then
27462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27466      # Going to short mode and back again did indeed matter. Since short mode is
27467      # case insensitive, let's make it lowercase to improve readability.
27468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27469      # Now convert it back to Unix-style (cygpath)
27470      input_path=`$CYGPATH -u "$shortmode_path"`
27471      new_path="$input_path"
27472    fi
27473  fi
27474
27475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27476  if test "x$test_cygdrive_prefix" = x; then
27477    # As a simple fix, exclude /usr/bin since it's not a real path.
27478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27480      # a path prefixed by /cygdrive for fixpath to work.
27481      new_path="$CYGWIN_ROOT_PATH$input_path"
27482    fi
27483  fi
27484
27485
27486  if test "x$path" != "x$new_path"; then
27487    BOOT_JDK="$new_path"
27488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27490  fi
27491
27492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27493
27494  path="$BOOT_JDK"
27495  has_colon=`$ECHO $path | $GREP ^.:`
27496  new_path="$path"
27497  if test "x$has_colon" = x; then
27498    # Not in mixed or Windows style, start by that.
27499    new_path=`cmd //c echo $path`
27500  fi
27501
27502
27503  input_path="$new_path"
27504  # Check if we need to convert this using DOS-style short mode. If the path
27505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27506  # take no chances and rewrite it.
27507  # Note: m4 eats our [], so we need to use [ and ] instead.
27508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27509  if test "x$has_forbidden_chars" != x; then
27510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27512  fi
27513
27514
27515  windows_path="$new_path"
27516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27517    unix_path=`$CYGPATH -u "$windows_path"`
27518    new_path="$unix_path"
27519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27521    new_path="$unix_path"
27522  fi
27523
27524  if test "x$path" != "x$new_path"; then
27525    BOOT_JDK="$new_path"
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27528  fi
27529
27530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27532
27533    else
27534      # We're on a unix platform. Hooray! :)
27535      path="$BOOT_JDK"
27536      has_space=`$ECHO "$path" | $GREP " "`
27537      if test "x$has_space" != x; then
27538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27541      fi
27542
27543      # Use eval to expand a potential ~
27544      eval path="$path"
27545      if test ! -f "$path" && test ! -d "$path"; then
27546        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27547      fi
27548
27549      if test -d "$path"; then
27550        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27551      else
27552        dir="`$DIRNAME "$path"`"
27553        base="`$BASENAME "$path"`"
27554        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27555      fi
27556    fi
27557  fi
27558
27559            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27560$as_echo_n "checking for Boot JDK... " >&6; }
27561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27562$as_echo "$BOOT_JDK" >&6; }
27563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27564$as_echo_n "checking Boot JDK version... " >&6; }
27565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27567$as_echo "$BOOT_JDK_VERSION" >&6; }
27568          fi # end check jdk version
27569        fi # end check javac
27570      fi # end check java
27571    fi # end check boot jdk found
27572  fi
27573
27574    done
27575  fi
27576
27577  fi
27578
27579
27580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27582      # Do we have a bin/java?
27583      if test ! -x "$BOOT_JDK/bin/java"; then
27584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27586        BOOT_JDK_FOUND=no
27587      else
27588        # Do we have a bin/javac?
27589        if test ! -x "$BOOT_JDK/bin/javac"; then
27590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27594          BOOT_JDK_FOUND=no
27595        else
27596          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27597          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27598
27599          # Extra M4 quote needed to protect [] in grep expression.
27600          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27601          if test "x$FOUND_CORRECT_VERSION" = x; then
27602            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27604            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27605$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27606            BOOT_JDK_FOUND=no
27607          else
27608            # We're done! :-)
27609            BOOT_JDK_FOUND=yes
27610
27611  # Only process if variable expands to non-empty
27612
27613  if test "x$BOOT_JDK" != x; then
27614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615
27616  # Input might be given as Windows format, start by converting to
27617  # unix format.
27618  path="$BOOT_JDK"
27619  new_path=`$CYGPATH -u "$path"`
27620
27621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27624  # "foo.exe" is OK but "foo" is an error.
27625  #
27626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27627  # It is also a way to make sure we got the proper file name for the real test later on.
27628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27629  if test "x$test_shortpath" = x; then
27630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27633  fi
27634
27635  # Call helper function which possibly converts this using DOS-style short mode.
27636  # If so, the updated path is stored in $new_path.
27637
27638  input_path="$new_path"
27639  # Check if we need to convert this using DOS-style short mode. If the path
27640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27641  # take no chances and rewrite it.
27642  # Note: m4 eats our [], so we need to use [ and ] instead.
27643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27644  if test "x$has_forbidden_chars" != x; then
27645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27649      # Going to short mode and back again did indeed matter. Since short mode is
27650      # case insensitive, let's make it lowercase to improve readability.
27651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27652      # Now convert it back to Unix-style (cygpath)
27653      input_path=`$CYGPATH -u "$shortmode_path"`
27654      new_path="$input_path"
27655    fi
27656  fi
27657
27658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27659  if test "x$test_cygdrive_prefix" = x; then
27660    # As a simple fix, exclude /usr/bin since it's not a real path.
27661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27663      # a path prefixed by /cygdrive for fixpath to work.
27664      new_path="$CYGWIN_ROOT_PATH$input_path"
27665    fi
27666  fi
27667
27668
27669  if test "x$path" != "x$new_path"; then
27670    BOOT_JDK="$new_path"
27671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27673  fi
27674
27675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27676
27677  path="$BOOT_JDK"
27678  has_colon=`$ECHO $path | $GREP ^.:`
27679  new_path="$path"
27680  if test "x$has_colon" = x; then
27681    # Not in mixed or Windows style, start by that.
27682    new_path=`cmd //c echo $path`
27683  fi
27684
27685
27686  input_path="$new_path"
27687  # Check if we need to convert this using DOS-style short mode. If the path
27688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27689  # take no chances and rewrite it.
27690  # Note: m4 eats our [], so we need to use [ and ] instead.
27691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27692  if test "x$has_forbidden_chars" != x; then
27693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27695  fi
27696
27697
27698  windows_path="$new_path"
27699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27700    unix_path=`$CYGPATH -u "$windows_path"`
27701    new_path="$unix_path"
27702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27704    new_path="$unix_path"
27705  fi
27706
27707  if test "x$path" != "x$new_path"; then
27708    BOOT_JDK="$new_path"
27709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27711  fi
27712
27713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27715
27716    else
27717      # We're on a unix platform. Hooray! :)
27718      path="$BOOT_JDK"
27719      has_space=`$ECHO "$path" | $GREP " "`
27720      if test "x$has_space" != x; then
27721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27724      fi
27725
27726      # Use eval to expand a potential ~
27727      eval path="$path"
27728      if test ! -f "$path" && test ! -d "$path"; then
27729        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27730      fi
27731
27732      if test -d "$path"; then
27733        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27734      else
27735        dir="`$DIRNAME "$path"`"
27736        base="`$BASENAME "$path"`"
27737        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27738      fi
27739    fi
27740  fi
27741
27742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27743$as_echo_n "checking for Boot JDK... " >&6; }
27744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27745$as_echo "$BOOT_JDK" >&6; }
27746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27747$as_echo_n "checking Boot JDK version... " >&6; }
27748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27750$as_echo "$BOOT_JDK_VERSION" >&6; }
27751          fi # end check jdk version
27752        fi # end check javac
27753      fi # end check java
27754    fi # end check boot jdk found
27755  fi
27756
27757
27758  if test "x$BOOT_JDK_FOUND" = xno; then
27759    # Now execute the test
27760
27761  if test "x$PROGRAMW6432" != x; then
27762    VIRTUAL_DIR="$PROGRAMW6432/Java"
27763
27764  windows_path="$VIRTUAL_DIR"
27765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27766    unix_path=`$CYGPATH -u "$windows_path"`
27767    VIRTUAL_DIR="$unix_path"
27768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27770    VIRTUAL_DIR="$unix_path"
27771  fi
27772
27773
27774  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27775  BOOT_JDK_SUFFIX=""
27776  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27777  if test "x$ALL_JDKS_FOUND" != x; then
27778    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27779
27780  if test "x$BOOT_JDK_FOUND" = xno; then
27781    # Now execute the test
27782
27783        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27784        if test -d "$BOOT_JDK"; then
27785          BOOT_JDK_FOUND=maybe
27786          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27787$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27788        fi
27789
27790
27791    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27792    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27793      # Do we have a bin/java?
27794      if test ! -x "$BOOT_JDK/bin/java"; then
27795        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27797        BOOT_JDK_FOUND=no
27798      else
27799        # Do we have a bin/javac?
27800        if test ! -x "$BOOT_JDK/bin/javac"; then
27801          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27803          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27804$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27805          BOOT_JDK_FOUND=no
27806        else
27807          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27808          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27809
27810          # Extra M4 quote needed to protect [] in grep expression.
27811          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27812          if test "x$FOUND_CORRECT_VERSION" = x; then
27813            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27815            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27816$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27817            BOOT_JDK_FOUND=no
27818          else
27819            # We're done! :-)
27820            BOOT_JDK_FOUND=yes
27821
27822  # Only process if variable expands to non-empty
27823
27824  if test "x$BOOT_JDK" != x; then
27825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27826
27827  # Input might be given as Windows format, start by converting to
27828  # unix format.
27829  path="$BOOT_JDK"
27830  new_path=`$CYGPATH -u "$path"`
27831
27832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27835  # "foo.exe" is OK but "foo" is an error.
27836  #
27837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27838  # It is also a way to make sure we got the proper file name for the real test later on.
27839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27840  if test "x$test_shortpath" = x; then
27841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27843    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27844  fi
27845
27846  # Call helper function which possibly converts this using DOS-style short mode.
27847  # If so, the updated path is stored in $new_path.
27848
27849  input_path="$new_path"
27850  # Check if we need to convert this using DOS-style short mode. If the path
27851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27852  # take no chances and rewrite it.
27853  # Note: m4 eats our [], so we need to use [ and ] instead.
27854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27855  if test "x$has_forbidden_chars" != x; then
27856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27860      # Going to short mode and back again did indeed matter. Since short mode is
27861      # case insensitive, let's make it lowercase to improve readability.
27862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27863      # Now convert it back to Unix-style (cygpath)
27864      input_path=`$CYGPATH -u "$shortmode_path"`
27865      new_path="$input_path"
27866    fi
27867  fi
27868
27869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27870  if test "x$test_cygdrive_prefix" = x; then
27871    # As a simple fix, exclude /usr/bin since it's not a real path.
27872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27874      # a path prefixed by /cygdrive for fixpath to work.
27875      new_path="$CYGWIN_ROOT_PATH$input_path"
27876    fi
27877  fi
27878
27879
27880  if test "x$path" != "x$new_path"; then
27881    BOOT_JDK="$new_path"
27882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27884  fi
27885
27886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27887
27888  path="$BOOT_JDK"
27889  has_colon=`$ECHO $path | $GREP ^.:`
27890  new_path="$path"
27891  if test "x$has_colon" = x; then
27892    # Not in mixed or Windows style, start by that.
27893    new_path=`cmd //c echo $path`
27894  fi
27895
27896
27897  input_path="$new_path"
27898  # Check if we need to convert this using DOS-style short mode. If the path
27899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27900  # take no chances and rewrite it.
27901  # Note: m4 eats our [], so we need to use [ and ] instead.
27902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27903  if test "x$has_forbidden_chars" != x; then
27904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27906  fi
27907
27908
27909  windows_path="$new_path"
27910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27911    unix_path=`$CYGPATH -u "$windows_path"`
27912    new_path="$unix_path"
27913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27915    new_path="$unix_path"
27916  fi
27917
27918  if test "x$path" != "x$new_path"; then
27919    BOOT_JDK="$new_path"
27920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27922  fi
27923
27924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27926
27927    else
27928      # We're on a unix platform. Hooray! :)
27929      path="$BOOT_JDK"
27930      has_space=`$ECHO "$path" | $GREP " "`
27931      if test "x$has_space" != x; then
27932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27935      fi
27936
27937      # Use eval to expand a potential ~
27938      eval path="$path"
27939      if test ! -f "$path" && test ! -d "$path"; then
27940        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27941      fi
27942
27943      if test -d "$path"; then
27944        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27945      else
27946        dir="`$DIRNAME "$path"`"
27947        base="`$BASENAME "$path"`"
27948        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27949      fi
27950    fi
27951  fi
27952
27953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27954$as_echo_n "checking for Boot JDK... " >&6; }
27955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27956$as_echo "$BOOT_JDK" >&6; }
27957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27958$as_echo_n "checking Boot JDK version... " >&6; }
27959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27961$as_echo "$BOOT_JDK_VERSION" >&6; }
27962          fi # end check jdk version
27963        fi # end check javac
27964      fi # end check java
27965    fi # end check boot jdk found
27966  fi
27967
27968    done
27969  fi
27970
27971  fi
27972
27973
27974    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27975    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27976      # Do we have a bin/java?
27977      if test ! -x "$BOOT_JDK/bin/java"; then
27978        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27980        BOOT_JDK_FOUND=no
27981      else
27982        # Do we have a bin/javac?
27983        if test ! -x "$BOOT_JDK/bin/javac"; then
27984          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27986          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27987$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27988          BOOT_JDK_FOUND=no
27989        else
27990          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27991          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27992
27993          # Extra M4 quote needed to protect [] in grep expression.
27994          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27995          if test "x$FOUND_CORRECT_VERSION" = x; then
27996            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27998            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27999$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28000            BOOT_JDK_FOUND=no
28001          else
28002            # We're done! :-)
28003            BOOT_JDK_FOUND=yes
28004
28005  # Only process if variable expands to non-empty
28006
28007  if test "x$BOOT_JDK" != x; then
28008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28009
28010  # Input might be given as Windows format, start by converting to
28011  # unix format.
28012  path="$BOOT_JDK"
28013  new_path=`$CYGPATH -u "$path"`
28014
28015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28018  # "foo.exe" is OK but "foo" is an error.
28019  #
28020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28021  # It is also a way to make sure we got the proper file name for the real test later on.
28022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28023  if test "x$test_shortpath" = x; then
28024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28025$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28026    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28027  fi
28028
28029  # Call helper function which possibly converts this using DOS-style short mode.
28030  # If so, the updated path is stored in $new_path.
28031
28032  input_path="$new_path"
28033  # Check if we need to convert this using DOS-style short mode. If the path
28034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28035  # take no chances and rewrite it.
28036  # Note: m4 eats our [], so we need to use [ and ] instead.
28037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28038  if test "x$has_forbidden_chars" != x; then
28039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28043      # Going to short mode and back again did indeed matter. Since short mode is
28044      # case insensitive, let's make it lowercase to improve readability.
28045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28046      # Now convert it back to Unix-style (cygpath)
28047      input_path=`$CYGPATH -u "$shortmode_path"`
28048      new_path="$input_path"
28049    fi
28050  fi
28051
28052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28053  if test "x$test_cygdrive_prefix" = x; then
28054    # As a simple fix, exclude /usr/bin since it's not a real path.
28055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28057      # a path prefixed by /cygdrive for fixpath to work.
28058      new_path="$CYGWIN_ROOT_PATH$input_path"
28059    fi
28060  fi
28061
28062
28063  if test "x$path" != "x$new_path"; then
28064    BOOT_JDK="$new_path"
28065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28067  fi
28068
28069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28070
28071  path="$BOOT_JDK"
28072  has_colon=`$ECHO $path | $GREP ^.:`
28073  new_path="$path"
28074  if test "x$has_colon" = x; then
28075    # Not in mixed or Windows style, start by that.
28076    new_path=`cmd //c echo $path`
28077  fi
28078
28079
28080  input_path="$new_path"
28081  # Check if we need to convert this using DOS-style short mode. If the path
28082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28083  # take no chances and rewrite it.
28084  # Note: m4 eats our [], so we need to use [ and ] instead.
28085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28086  if test "x$has_forbidden_chars" != x; then
28087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28089  fi
28090
28091
28092  windows_path="$new_path"
28093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28094    unix_path=`$CYGPATH -u "$windows_path"`
28095    new_path="$unix_path"
28096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28098    new_path="$unix_path"
28099  fi
28100
28101  if test "x$path" != "x$new_path"; then
28102    BOOT_JDK="$new_path"
28103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28105  fi
28106
28107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28109
28110    else
28111      # We're on a unix platform. Hooray! :)
28112      path="$BOOT_JDK"
28113      has_space=`$ECHO "$path" | $GREP " "`
28114      if test "x$has_space" != x; then
28115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28118      fi
28119
28120      # Use eval to expand a potential ~
28121      eval path="$path"
28122      if test ! -f "$path" && test ! -d "$path"; then
28123        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28124      fi
28125
28126      if test -d "$path"; then
28127        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28128      else
28129        dir="`$DIRNAME "$path"`"
28130        base="`$BASENAME "$path"`"
28131        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28132      fi
28133    fi
28134  fi
28135
28136            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28137$as_echo_n "checking for Boot JDK... " >&6; }
28138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28139$as_echo "$BOOT_JDK" >&6; }
28140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28141$as_echo_n "checking Boot JDK version... " >&6; }
28142            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28144$as_echo "$BOOT_JDK_VERSION" >&6; }
28145          fi # end check jdk version
28146        fi # end check javac
28147      fi # end check java
28148    fi # end check boot jdk found
28149  fi
28150
28151
28152  if test "x$BOOT_JDK_FOUND" = xno; then
28153    # Now execute the test
28154
28155  if test "x$PROGRAMFILES" != x; then
28156    VIRTUAL_DIR="$PROGRAMFILES/Java"
28157
28158  windows_path="$VIRTUAL_DIR"
28159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28160    unix_path=`$CYGPATH -u "$windows_path"`
28161    VIRTUAL_DIR="$unix_path"
28162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28164    VIRTUAL_DIR="$unix_path"
28165  fi
28166
28167
28168  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28169  BOOT_JDK_SUFFIX=""
28170  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28171  if test "x$ALL_JDKS_FOUND" != x; then
28172    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28173
28174  if test "x$BOOT_JDK_FOUND" = xno; then
28175    # Now execute the test
28176
28177        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28178        if test -d "$BOOT_JDK"; then
28179          BOOT_JDK_FOUND=maybe
28180          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28181$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28182        fi
28183
28184
28185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28187      # Do we have a bin/java?
28188      if test ! -x "$BOOT_JDK/bin/java"; then
28189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28191        BOOT_JDK_FOUND=no
28192      else
28193        # Do we have a bin/javac?
28194        if test ! -x "$BOOT_JDK/bin/javac"; then
28195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28199          BOOT_JDK_FOUND=no
28200        else
28201          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28202          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28203
28204          # Extra M4 quote needed to protect [] in grep expression.
28205          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28206          if test "x$FOUND_CORRECT_VERSION" = x; then
28207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28209            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28210$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28211            BOOT_JDK_FOUND=no
28212          else
28213            # We're done! :-)
28214            BOOT_JDK_FOUND=yes
28215
28216  # Only process if variable expands to non-empty
28217
28218  if test "x$BOOT_JDK" != x; then
28219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28220
28221  # Input might be given as Windows format, start by converting to
28222  # unix format.
28223  path="$BOOT_JDK"
28224  new_path=`$CYGPATH -u "$path"`
28225
28226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28229  # "foo.exe" is OK but "foo" is an error.
28230  #
28231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28232  # It is also a way to make sure we got the proper file name for the real test later on.
28233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28234  if test "x$test_shortpath" = x; then
28235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28238  fi
28239
28240  # Call helper function which possibly converts this using DOS-style short mode.
28241  # If so, the updated path is stored in $new_path.
28242
28243  input_path="$new_path"
28244  # Check if we need to convert this using DOS-style short mode. If the path
28245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28246  # take no chances and rewrite it.
28247  # Note: m4 eats our [], so we need to use [ and ] instead.
28248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28249  if test "x$has_forbidden_chars" != x; then
28250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28254      # Going to short mode and back again did indeed matter. Since short mode is
28255      # case insensitive, let's make it lowercase to improve readability.
28256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28257      # Now convert it back to Unix-style (cygpath)
28258      input_path=`$CYGPATH -u "$shortmode_path"`
28259      new_path="$input_path"
28260    fi
28261  fi
28262
28263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28264  if test "x$test_cygdrive_prefix" = x; then
28265    # As a simple fix, exclude /usr/bin since it's not a real path.
28266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28268      # a path prefixed by /cygdrive for fixpath to work.
28269      new_path="$CYGWIN_ROOT_PATH$input_path"
28270    fi
28271  fi
28272
28273
28274  if test "x$path" != "x$new_path"; then
28275    BOOT_JDK="$new_path"
28276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28278  fi
28279
28280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28281
28282  path="$BOOT_JDK"
28283  has_colon=`$ECHO $path | $GREP ^.:`
28284  new_path="$path"
28285  if test "x$has_colon" = x; then
28286    # Not in mixed or Windows style, start by that.
28287    new_path=`cmd //c echo $path`
28288  fi
28289
28290
28291  input_path="$new_path"
28292  # Check if we need to convert this using DOS-style short mode. If the path
28293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28294  # take no chances and rewrite it.
28295  # Note: m4 eats our [], so we need to use [ and ] instead.
28296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28297  if test "x$has_forbidden_chars" != x; then
28298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28300  fi
28301
28302
28303  windows_path="$new_path"
28304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28305    unix_path=`$CYGPATH -u "$windows_path"`
28306    new_path="$unix_path"
28307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28309    new_path="$unix_path"
28310  fi
28311
28312  if test "x$path" != "x$new_path"; then
28313    BOOT_JDK="$new_path"
28314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28316  fi
28317
28318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28320
28321    else
28322      # We're on a unix platform. Hooray! :)
28323      path="$BOOT_JDK"
28324      has_space=`$ECHO "$path" | $GREP " "`
28325      if test "x$has_space" != x; then
28326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28329      fi
28330
28331      # Use eval to expand a potential ~
28332      eval path="$path"
28333      if test ! -f "$path" && test ! -d "$path"; then
28334        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28335      fi
28336
28337      if test -d "$path"; then
28338        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28339      else
28340        dir="`$DIRNAME "$path"`"
28341        base="`$BASENAME "$path"`"
28342        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28343      fi
28344    fi
28345  fi
28346
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28348$as_echo_n "checking for Boot JDK... " >&6; }
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28350$as_echo "$BOOT_JDK" >&6; }
28351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28352$as_echo_n "checking Boot JDK version... " >&6; }
28353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28355$as_echo "$BOOT_JDK_VERSION" >&6; }
28356          fi # end check jdk version
28357        fi # end check javac
28358      fi # end check java
28359    fi # end check boot jdk found
28360  fi
28361
28362    done
28363  fi
28364
28365  fi
28366
28367
28368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28370      # Do we have a bin/java?
28371      if test ! -x "$BOOT_JDK/bin/java"; then
28372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28374        BOOT_JDK_FOUND=no
28375      else
28376        # Do we have a bin/javac?
28377        if test ! -x "$BOOT_JDK/bin/javac"; then
28378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28382          BOOT_JDK_FOUND=no
28383        else
28384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28386
28387          # Extra M4 quote needed to protect [] in grep expression.
28388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28389          if test "x$FOUND_CORRECT_VERSION" = x; then
28390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28394            BOOT_JDK_FOUND=no
28395          else
28396            # We're done! :-)
28397            BOOT_JDK_FOUND=yes
28398
28399  # Only process if variable expands to non-empty
28400
28401  if test "x$BOOT_JDK" != x; then
28402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28403
28404  # Input might be given as Windows format, start by converting to
28405  # unix format.
28406  path="$BOOT_JDK"
28407  new_path=`$CYGPATH -u "$path"`
28408
28409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28412  # "foo.exe" is OK but "foo" is an error.
28413  #
28414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28415  # It is also a way to make sure we got the proper file name for the real test later on.
28416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28417  if test "x$test_shortpath" = x; then
28418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28421  fi
28422
28423  # Call helper function which possibly converts this using DOS-style short mode.
28424  # If so, the updated path is stored in $new_path.
28425
28426  input_path="$new_path"
28427  # Check if we need to convert this using DOS-style short mode. If the path
28428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28429  # take no chances and rewrite it.
28430  # Note: m4 eats our [], so we need to use [ and ] instead.
28431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28432  if test "x$has_forbidden_chars" != x; then
28433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28437      # Going to short mode and back again did indeed matter. Since short mode is
28438      # case insensitive, let's make it lowercase to improve readability.
28439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28440      # Now convert it back to Unix-style (cygpath)
28441      input_path=`$CYGPATH -u "$shortmode_path"`
28442      new_path="$input_path"
28443    fi
28444  fi
28445
28446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28447  if test "x$test_cygdrive_prefix" = x; then
28448    # As a simple fix, exclude /usr/bin since it's not a real path.
28449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28451      # a path prefixed by /cygdrive for fixpath to work.
28452      new_path="$CYGWIN_ROOT_PATH$input_path"
28453    fi
28454  fi
28455
28456
28457  if test "x$path" != "x$new_path"; then
28458    BOOT_JDK="$new_path"
28459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28461  fi
28462
28463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28464
28465  path="$BOOT_JDK"
28466  has_colon=`$ECHO $path | $GREP ^.:`
28467  new_path="$path"
28468  if test "x$has_colon" = x; then
28469    # Not in mixed or Windows style, start by that.
28470    new_path=`cmd //c echo $path`
28471  fi
28472
28473
28474  input_path="$new_path"
28475  # Check if we need to convert this using DOS-style short mode. If the path
28476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28477  # take no chances and rewrite it.
28478  # Note: m4 eats our [], so we need to use [ and ] instead.
28479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28480  if test "x$has_forbidden_chars" != x; then
28481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28483  fi
28484
28485
28486  windows_path="$new_path"
28487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28488    unix_path=`$CYGPATH -u "$windows_path"`
28489    new_path="$unix_path"
28490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28492    new_path="$unix_path"
28493  fi
28494
28495  if test "x$path" != "x$new_path"; then
28496    BOOT_JDK="$new_path"
28497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28499  fi
28500
28501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28503
28504    else
28505      # We're on a unix platform. Hooray! :)
28506      path="$BOOT_JDK"
28507      has_space=`$ECHO "$path" | $GREP " "`
28508      if test "x$has_space" != x; then
28509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28512      fi
28513
28514      # Use eval to expand a potential ~
28515      eval path="$path"
28516      if test ! -f "$path" && test ! -d "$path"; then
28517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28518      fi
28519
28520      if test -d "$path"; then
28521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28522      else
28523        dir="`$DIRNAME "$path"`"
28524        base="`$BASENAME "$path"`"
28525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28526      fi
28527    fi
28528  fi
28529
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28531$as_echo_n "checking for Boot JDK... " >&6; }
28532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28533$as_echo "$BOOT_JDK" >&6; }
28534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28535$as_echo_n "checking Boot JDK version... " >&6; }
28536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28538$as_echo "$BOOT_JDK_VERSION" >&6; }
28539          fi # end check jdk version
28540        fi # end check javac
28541      fi # end check java
28542    fi # end check boot jdk found
28543  fi
28544
28545
28546  if test "x$BOOT_JDK_FOUND" = xno; then
28547    # Now execute the test
28548
28549  if test "x$ProgramFiles" != x; then
28550    VIRTUAL_DIR="$ProgramFiles/Java"
28551
28552  windows_path="$VIRTUAL_DIR"
28553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28554    unix_path=`$CYGPATH -u "$windows_path"`
28555    VIRTUAL_DIR="$unix_path"
28556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28558    VIRTUAL_DIR="$unix_path"
28559  fi
28560
28561
28562  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28563  BOOT_JDK_SUFFIX=""
28564  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28565  if test "x$ALL_JDKS_FOUND" != x; then
28566    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28567
28568  if test "x$BOOT_JDK_FOUND" = xno; then
28569    # Now execute the test
28570
28571        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28572        if test -d "$BOOT_JDK"; then
28573          BOOT_JDK_FOUND=maybe
28574          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28575$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28576        fi
28577
28578
28579    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28580    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28581      # Do we have a bin/java?
28582      if test ! -x "$BOOT_JDK/bin/java"; then
28583        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28585        BOOT_JDK_FOUND=no
28586      else
28587        # Do we have a bin/javac?
28588        if test ! -x "$BOOT_JDK/bin/javac"; then
28589          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28591          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28592$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28593          BOOT_JDK_FOUND=no
28594        else
28595          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28596          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28597
28598          # Extra M4 quote needed to protect [] in grep expression.
28599          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28600          if test "x$FOUND_CORRECT_VERSION" = x; then
28601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28603            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28604$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28605            BOOT_JDK_FOUND=no
28606          else
28607            # We're done! :-)
28608            BOOT_JDK_FOUND=yes
28609
28610  # Only process if variable expands to non-empty
28611
28612  if test "x$BOOT_JDK" != x; then
28613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28614
28615  # Input might be given as Windows format, start by converting to
28616  # unix format.
28617  path="$BOOT_JDK"
28618  new_path=`$CYGPATH -u "$path"`
28619
28620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28623  # "foo.exe" is OK but "foo" is an error.
28624  #
28625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28626  # It is also a way to make sure we got the proper file name for the real test later on.
28627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28628  if test "x$test_shortpath" = x; then
28629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28632  fi
28633
28634  # Call helper function which possibly converts this using DOS-style short mode.
28635  # If so, the updated path is stored in $new_path.
28636
28637  input_path="$new_path"
28638  # Check if we need to convert this using DOS-style short mode. If the path
28639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28640  # take no chances and rewrite it.
28641  # Note: m4 eats our [], so we need to use [ and ] instead.
28642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28643  if test "x$has_forbidden_chars" != x; then
28644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28648      # Going to short mode and back again did indeed matter. Since short mode is
28649      # case insensitive, let's make it lowercase to improve readability.
28650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28651      # Now convert it back to Unix-style (cygpath)
28652      input_path=`$CYGPATH -u "$shortmode_path"`
28653      new_path="$input_path"
28654    fi
28655  fi
28656
28657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28658  if test "x$test_cygdrive_prefix" = x; then
28659    # As a simple fix, exclude /usr/bin since it's not a real path.
28660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28662      # a path prefixed by /cygdrive for fixpath to work.
28663      new_path="$CYGWIN_ROOT_PATH$input_path"
28664    fi
28665  fi
28666
28667
28668  if test "x$path" != "x$new_path"; then
28669    BOOT_JDK="$new_path"
28670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28672  fi
28673
28674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28675
28676  path="$BOOT_JDK"
28677  has_colon=`$ECHO $path | $GREP ^.:`
28678  new_path="$path"
28679  if test "x$has_colon" = x; then
28680    # Not in mixed or Windows style, start by that.
28681    new_path=`cmd //c echo $path`
28682  fi
28683
28684
28685  input_path="$new_path"
28686  # Check if we need to convert this using DOS-style short mode. If the path
28687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28688  # take no chances and rewrite it.
28689  # Note: m4 eats our [], so we need to use [ and ] instead.
28690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28691  if test "x$has_forbidden_chars" != x; then
28692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28694  fi
28695
28696
28697  windows_path="$new_path"
28698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28699    unix_path=`$CYGPATH -u "$windows_path"`
28700    new_path="$unix_path"
28701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28703    new_path="$unix_path"
28704  fi
28705
28706  if test "x$path" != "x$new_path"; then
28707    BOOT_JDK="$new_path"
28708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28710  fi
28711
28712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28714
28715    else
28716      # We're on a unix platform. Hooray! :)
28717      path="$BOOT_JDK"
28718      has_space=`$ECHO "$path" | $GREP " "`
28719      if test "x$has_space" != x; then
28720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28723      fi
28724
28725      # Use eval to expand a potential ~
28726      eval path="$path"
28727      if test ! -f "$path" && test ! -d "$path"; then
28728        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28729      fi
28730
28731      if test -d "$path"; then
28732        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28733      else
28734        dir="`$DIRNAME "$path"`"
28735        base="`$BASENAME "$path"`"
28736        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28737      fi
28738    fi
28739  fi
28740
28741            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28742$as_echo_n "checking for Boot JDK... " >&6; }
28743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28744$as_echo "$BOOT_JDK" >&6; }
28745            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28746$as_echo_n "checking Boot JDK version... " >&6; }
28747            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28749$as_echo "$BOOT_JDK_VERSION" >&6; }
28750          fi # end check jdk version
28751        fi # end check javac
28752      fi # end check java
28753    fi # end check boot jdk found
28754  fi
28755
28756    done
28757  fi
28758
28759  fi
28760
28761
28762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28764      # Do we have a bin/java?
28765      if test ! -x "$BOOT_JDK/bin/java"; then
28766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28768        BOOT_JDK_FOUND=no
28769      else
28770        # Do we have a bin/javac?
28771        if test ! -x "$BOOT_JDK/bin/javac"; then
28772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28776          BOOT_JDK_FOUND=no
28777        else
28778          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28779          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28780
28781          # Extra M4 quote needed to protect [] in grep expression.
28782          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28783          if test "x$FOUND_CORRECT_VERSION" = x; then
28784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28786            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28787$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28788            BOOT_JDK_FOUND=no
28789          else
28790            # We're done! :-)
28791            BOOT_JDK_FOUND=yes
28792
28793  # Only process if variable expands to non-empty
28794
28795  if test "x$BOOT_JDK" != x; then
28796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28797
28798  # Input might be given as Windows format, start by converting to
28799  # unix format.
28800  path="$BOOT_JDK"
28801  new_path=`$CYGPATH -u "$path"`
28802
28803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28806  # "foo.exe" is OK but "foo" is an error.
28807  #
28808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28809  # It is also a way to make sure we got the proper file name for the real test later on.
28810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28811  if test "x$test_shortpath" = x; then
28812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28814    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28815  fi
28816
28817  # Call helper function which possibly converts this using DOS-style short mode.
28818  # If so, the updated path is stored in $new_path.
28819
28820  input_path="$new_path"
28821  # Check if we need to convert this using DOS-style short mode. If the path
28822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28823  # take no chances and rewrite it.
28824  # Note: m4 eats our [], so we need to use [ and ] instead.
28825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28826  if test "x$has_forbidden_chars" != x; then
28827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28831      # Going to short mode and back again did indeed matter. Since short mode is
28832      # case insensitive, let's make it lowercase to improve readability.
28833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28834      # Now convert it back to Unix-style (cygpath)
28835      input_path=`$CYGPATH -u "$shortmode_path"`
28836      new_path="$input_path"
28837    fi
28838  fi
28839
28840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28841  if test "x$test_cygdrive_prefix" = x; then
28842    # As a simple fix, exclude /usr/bin since it's not a real path.
28843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28845      # a path prefixed by /cygdrive for fixpath to work.
28846      new_path="$CYGWIN_ROOT_PATH$input_path"
28847    fi
28848  fi
28849
28850
28851  if test "x$path" != "x$new_path"; then
28852    BOOT_JDK="$new_path"
28853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28855  fi
28856
28857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28858
28859  path="$BOOT_JDK"
28860  has_colon=`$ECHO $path | $GREP ^.:`
28861  new_path="$path"
28862  if test "x$has_colon" = x; then
28863    # Not in mixed or Windows style, start by that.
28864    new_path=`cmd //c echo $path`
28865  fi
28866
28867
28868  input_path="$new_path"
28869  # Check if we need to convert this using DOS-style short mode. If the path
28870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28871  # take no chances and rewrite it.
28872  # Note: m4 eats our [], so we need to use [ and ] instead.
28873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28874  if test "x$has_forbidden_chars" != x; then
28875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28877  fi
28878
28879
28880  windows_path="$new_path"
28881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28882    unix_path=`$CYGPATH -u "$windows_path"`
28883    new_path="$unix_path"
28884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28886    new_path="$unix_path"
28887  fi
28888
28889  if test "x$path" != "x$new_path"; then
28890    BOOT_JDK="$new_path"
28891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28893  fi
28894
28895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28897
28898    else
28899      # We're on a unix platform. Hooray! :)
28900      path="$BOOT_JDK"
28901      has_space=`$ECHO "$path" | $GREP " "`
28902      if test "x$has_space" != x; then
28903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28904$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28906      fi
28907
28908      # Use eval to expand a potential ~
28909      eval path="$path"
28910      if test ! -f "$path" && test ! -d "$path"; then
28911        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28912      fi
28913
28914      if test -d "$path"; then
28915        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28916      else
28917        dir="`$DIRNAME "$path"`"
28918        base="`$BASENAME "$path"`"
28919        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28920      fi
28921    fi
28922  fi
28923
28924            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28925$as_echo_n "checking for Boot JDK... " >&6; }
28926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28927$as_echo "$BOOT_JDK" >&6; }
28928            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28929$as_echo_n "checking Boot JDK version... " >&6; }
28930            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28932$as_echo "$BOOT_JDK_VERSION" >&6; }
28933          fi # end check jdk version
28934        fi # end check javac
28935      fi # end check java
28936    fi # end check boot jdk found
28937  fi
28938
28939
28940  if test "x$BOOT_JDK_FOUND" = xno; then
28941    # Now execute the test
28942
28943  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28944  BOOT_JDK_SUFFIX=""
28945  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28946  if test "x$ALL_JDKS_FOUND" != x; then
28947    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28948
28949  if test "x$BOOT_JDK_FOUND" = xno; then
28950    # Now execute the test
28951
28952        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28953        if test -d "$BOOT_JDK"; then
28954          BOOT_JDK_FOUND=maybe
28955          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28956$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28957        fi
28958
28959
28960    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28961    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28962      # Do we have a bin/java?
28963      if test ! -x "$BOOT_JDK/bin/java"; then
28964        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28966        BOOT_JDK_FOUND=no
28967      else
28968        # Do we have a bin/javac?
28969        if test ! -x "$BOOT_JDK/bin/javac"; then
28970          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28972          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28973$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28974          BOOT_JDK_FOUND=no
28975        else
28976          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28977          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28978
28979          # Extra M4 quote needed to protect [] in grep expression.
28980          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28981          if test "x$FOUND_CORRECT_VERSION" = x; then
28982            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28984            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28985$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28986            BOOT_JDK_FOUND=no
28987          else
28988            # We're done! :-)
28989            BOOT_JDK_FOUND=yes
28990
28991  # Only process if variable expands to non-empty
28992
28993  if test "x$BOOT_JDK" != x; then
28994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28995
28996  # Input might be given as Windows format, start by converting to
28997  # unix format.
28998  path="$BOOT_JDK"
28999  new_path=`$CYGPATH -u "$path"`
29000
29001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29004  # "foo.exe" is OK but "foo" is an error.
29005  #
29006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29007  # It is also a way to make sure we got the proper file name for the real test later on.
29008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29009  if test "x$test_shortpath" = x; then
29010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29012    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29013  fi
29014
29015  # Call helper function which possibly converts this using DOS-style short mode.
29016  # If so, the updated path is stored in $new_path.
29017
29018  input_path="$new_path"
29019  # Check if we need to convert this using DOS-style short mode. If the path
29020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29021  # take no chances and rewrite it.
29022  # Note: m4 eats our [], so we need to use [ and ] instead.
29023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29024  if test "x$has_forbidden_chars" != x; then
29025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29029      # Going to short mode and back again did indeed matter. Since short mode is
29030      # case insensitive, let's make it lowercase to improve readability.
29031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29032      # Now convert it back to Unix-style (cygpath)
29033      input_path=`$CYGPATH -u "$shortmode_path"`
29034      new_path="$input_path"
29035    fi
29036  fi
29037
29038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29039  if test "x$test_cygdrive_prefix" = x; then
29040    # As a simple fix, exclude /usr/bin since it's not a real path.
29041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29043      # a path prefixed by /cygdrive for fixpath to work.
29044      new_path="$CYGWIN_ROOT_PATH$input_path"
29045    fi
29046  fi
29047
29048
29049  if test "x$path" != "x$new_path"; then
29050    BOOT_JDK="$new_path"
29051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29053  fi
29054
29055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29056
29057  path="$BOOT_JDK"
29058  has_colon=`$ECHO $path | $GREP ^.:`
29059  new_path="$path"
29060  if test "x$has_colon" = x; then
29061    # Not in mixed or Windows style, start by that.
29062    new_path=`cmd //c echo $path`
29063  fi
29064
29065
29066  input_path="$new_path"
29067  # Check if we need to convert this using DOS-style short mode. If the path
29068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29069  # take no chances and rewrite it.
29070  # Note: m4 eats our [], so we need to use [ and ] instead.
29071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29072  if test "x$has_forbidden_chars" != x; then
29073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29075  fi
29076
29077
29078  windows_path="$new_path"
29079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29080    unix_path=`$CYGPATH -u "$windows_path"`
29081    new_path="$unix_path"
29082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29084    new_path="$unix_path"
29085  fi
29086
29087  if test "x$path" != "x$new_path"; then
29088    BOOT_JDK="$new_path"
29089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29091  fi
29092
29093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29095
29096    else
29097      # We're on a unix platform. Hooray! :)
29098      path="$BOOT_JDK"
29099      has_space=`$ECHO "$path" | $GREP " "`
29100      if test "x$has_space" != x; then
29101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29104      fi
29105
29106      # Use eval to expand a potential ~
29107      eval path="$path"
29108      if test ! -f "$path" && test ! -d "$path"; then
29109        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29110      fi
29111
29112      if test -d "$path"; then
29113        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29114      else
29115        dir="`$DIRNAME "$path"`"
29116        base="`$BASENAME "$path"`"
29117        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29118      fi
29119    fi
29120  fi
29121
29122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29123$as_echo_n "checking for Boot JDK... " >&6; }
29124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29125$as_echo "$BOOT_JDK" >&6; }
29126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29127$as_echo_n "checking Boot JDK version... " >&6; }
29128            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29130$as_echo "$BOOT_JDK_VERSION" >&6; }
29131          fi # end check jdk version
29132        fi # end check javac
29133      fi # end check java
29134    fi # end check boot jdk found
29135  fi
29136
29137    done
29138  fi
29139
29140
29141    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29142    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29143      # Do we have a bin/java?
29144      if test ! -x "$BOOT_JDK/bin/java"; then
29145        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29147        BOOT_JDK_FOUND=no
29148      else
29149        # Do we have a bin/javac?
29150        if test ! -x "$BOOT_JDK/bin/javac"; then
29151          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29153          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29154$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29155          BOOT_JDK_FOUND=no
29156        else
29157          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29158          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29159
29160          # Extra M4 quote needed to protect [] in grep expression.
29161          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29162          if test "x$FOUND_CORRECT_VERSION" = x; then
29163            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29165            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29166$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29167            BOOT_JDK_FOUND=no
29168          else
29169            # We're done! :-)
29170            BOOT_JDK_FOUND=yes
29171
29172  # Only process if variable expands to non-empty
29173
29174  if test "x$BOOT_JDK" != x; then
29175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29176
29177  # Input might be given as Windows format, start by converting to
29178  # unix format.
29179  path="$BOOT_JDK"
29180  new_path=`$CYGPATH -u "$path"`
29181
29182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29185  # "foo.exe" is OK but "foo" is an error.
29186  #
29187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29188  # It is also a way to make sure we got the proper file name for the real test later on.
29189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29190  if test "x$test_shortpath" = x; then
29191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29193    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29194  fi
29195
29196  # Call helper function which possibly converts this using DOS-style short mode.
29197  # If so, the updated path is stored in $new_path.
29198
29199  input_path="$new_path"
29200  # Check if we need to convert this using DOS-style short mode. If the path
29201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29202  # take no chances and rewrite it.
29203  # Note: m4 eats our [], so we need to use [ and ] instead.
29204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29205  if test "x$has_forbidden_chars" != x; then
29206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29210      # Going to short mode and back again did indeed matter. Since short mode is
29211      # case insensitive, let's make it lowercase to improve readability.
29212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29213      # Now convert it back to Unix-style (cygpath)
29214      input_path=`$CYGPATH -u "$shortmode_path"`
29215      new_path="$input_path"
29216    fi
29217  fi
29218
29219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29220  if test "x$test_cygdrive_prefix" = x; then
29221    # As a simple fix, exclude /usr/bin since it's not a real path.
29222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29224      # a path prefixed by /cygdrive for fixpath to work.
29225      new_path="$CYGWIN_ROOT_PATH$input_path"
29226    fi
29227  fi
29228
29229
29230  if test "x$path" != "x$new_path"; then
29231    BOOT_JDK="$new_path"
29232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29234  fi
29235
29236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29237
29238  path="$BOOT_JDK"
29239  has_colon=`$ECHO $path | $GREP ^.:`
29240  new_path="$path"
29241  if test "x$has_colon" = x; then
29242    # Not in mixed or Windows style, start by that.
29243    new_path=`cmd //c echo $path`
29244  fi
29245
29246
29247  input_path="$new_path"
29248  # Check if we need to convert this using DOS-style short mode. If the path
29249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29250  # take no chances and rewrite it.
29251  # Note: m4 eats our [], so we need to use [ and ] instead.
29252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29253  if test "x$has_forbidden_chars" != x; then
29254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29256  fi
29257
29258
29259  windows_path="$new_path"
29260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29261    unix_path=`$CYGPATH -u "$windows_path"`
29262    new_path="$unix_path"
29263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29265    new_path="$unix_path"
29266  fi
29267
29268  if test "x$path" != "x$new_path"; then
29269    BOOT_JDK="$new_path"
29270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29272  fi
29273
29274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29276
29277    else
29278      # We're on a unix platform. Hooray! :)
29279      path="$BOOT_JDK"
29280      has_space=`$ECHO "$path" | $GREP " "`
29281      if test "x$has_space" != x; then
29282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29285      fi
29286
29287      # Use eval to expand a potential ~
29288      eval path="$path"
29289      if test ! -f "$path" && test ! -d "$path"; then
29290        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29291      fi
29292
29293      if test -d "$path"; then
29294        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29295      else
29296        dir="`$DIRNAME "$path"`"
29297        base="`$BASENAME "$path"`"
29298        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29299      fi
29300    fi
29301  fi
29302
29303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29304$as_echo_n "checking for Boot JDK... " >&6; }
29305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29306$as_echo "$BOOT_JDK" >&6; }
29307            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29308$as_echo_n "checking Boot JDK version... " >&6; }
29309            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29311$as_echo "$BOOT_JDK_VERSION" >&6; }
29312          fi # end check jdk version
29313        fi # end check javac
29314      fi # end check java
29315    fi # end check boot jdk found
29316  fi
29317
29318  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29319
29320  if test "x$BOOT_JDK_FOUND" = xno; then
29321    # Now execute the test
29322
29323  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29324  BOOT_JDK_SUFFIX="/Contents/Home"
29325  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29326  if test "x$ALL_JDKS_FOUND" != x; then
29327    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29328
29329  if test "x$BOOT_JDK_FOUND" = xno; then
29330    # Now execute the test
29331
29332        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29333        if test -d "$BOOT_JDK"; then
29334          BOOT_JDK_FOUND=maybe
29335          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29336$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29337        fi
29338
29339
29340    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29341    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29342      # Do we have a bin/java?
29343      if test ! -x "$BOOT_JDK/bin/java"; then
29344        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29346        BOOT_JDK_FOUND=no
29347      else
29348        # Do we have a bin/javac?
29349        if test ! -x "$BOOT_JDK/bin/javac"; then
29350          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29352          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29353$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29354          BOOT_JDK_FOUND=no
29355        else
29356          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29357          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29358
29359          # Extra M4 quote needed to protect [] in grep expression.
29360          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29361          if test "x$FOUND_CORRECT_VERSION" = x; then
29362            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29364            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29365$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29366            BOOT_JDK_FOUND=no
29367          else
29368            # We're done! :-)
29369            BOOT_JDK_FOUND=yes
29370
29371  # Only process if variable expands to non-empty
29372
29373  if test "x$BOOT_JDK" != x; then
29374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29375
29376  # Input might be given as Windows format, start by converting to
29377  # unix format.
29378  path="$BOOT_JDK"
29379  new_path=`$CYGPATH -u "$path"`
29380
29381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29384  # "foo.exe" is OK but "foo" is an error.
29385  #
29386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29387  # It is also a way to make sure we got the proper file name for the real test later on.
29388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29389  if test "x$test_shortpath" = x; then
29390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29391$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29392    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29393  fi
29394
29395  # Call helper function which possibly converts this using DOS-style short mode.
29396  # If so, the updated path is stored in $new_path.
29397
29398  input_path="$new_path"
29399  # Check if we need to convert this using DOS-style short mode. If the path
29400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29401  # take no chances and rewrite it.
29402  # Note: m4 eats our [], so we need to use [ and ] instead.
29403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29404  if test "x$has_forbidden_chars" != x; then
29405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29409      # Going to short mode and back again did indeed matter. Since short mode is
29410      # case insensitive, let's make it lowercase to improve readability.
29411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29412      # Now convert it back to Unix-style (cygpath)
29413      input_path=`$CYGPATH -u "$shortmode_path"`
29414      new_path="$input_path"
29415    fi
29416  fi
29417
29418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29419  if test "x$test_cygdrive_prefix" = x; then
29420    # As a simple fix, exclude /usr/bin since it's not a real path.
29421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29423      # a path prefixed by /cygdrive for fixpath to work.
29424      new_path="$CYGWIN_ROOT_PATH$input_path"
29425    fi
29426  fi
29427
29428
29429  if test "x$path" != "x$new_path"; then
29430    BOOT_JDK="$new_path"
29431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29432$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29433  fi
29434
29435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29436
29437  path="$BOOT_JDK"
29438  has_colon=`$ECHO $path | $GREP ^.:`
29439  new_path="$path"
29440  if test "x$has_colon" = x; then
29441    # Not in mixed or Windows style, start by that.
29442    new_path=`cmd //c echo $path`
29443  fi
29444
29445
29446  input_path="$new_path"
29447  # Check if we need to convert this using DOS-style short mode. If the path
29448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29449  # take no chances and rewrite it.
29450  # Note: m4 eats our [], so we need to use [ and ] instead.
29451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29452  if test "x$has_forbidden_chars" != x; then
29453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29455  fi
29456
29457
29458  windows_path="$new_path"
29459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29460    unix_path=`$CYGPATH -u "$windows_path"`
29461    new_path="$unix_path"
29462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29464    new_path="$unix_path"
29465  fi
29466
29467  if test "x$path" != "x$new_path"; then
29468    BOOT_JDK="$new_path"
29469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29471  fi
29472
29473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29475
29476    else
29477      # We're on a unix platform. Hooray! :)
29478      path="$BOOT_JDK"
29479      has_space=`$ECHO "$path" | $GREP " "`
29480      if test "x$has_space" != x; then
29481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29482$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29483        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29484      fi
29485
29486      # Use eval to expand a potential ~
29487      eval path="$path"
29488      if test ! -f "$path" && test ! -d "$path"; then
29489        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29490      fi
29491
29492      if test -d "$path"; then
29493        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29494      else
29495        dir="`$DIRNAME "$path"`"
29496        base="`$BASENAME "$path"`"
29497        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29498      fi
29499    fi
29500  fi
29501
29502            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29503$as_echo_n "checking for Boot JDK... " >&6; }
29504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29505$as_echo "$BOOT_JDK" >&6; }
29506            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29507$as_echo_n "checking Boot JDK version... " >&6; }
29508            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29510$as_echo "$BOOT_JDK_VERSION" >&6; }
29511          fi # end check jdk version
29512        fi # end check javac
29513      fi # end check java
29514    fi # end check boot jdk found
29515  fi
29516
29517    done
29518  fi
29519
29520
29521    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29522    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29523      # Do we have a bin/java?
29524      if test ! -x "$BOOT_JDK/bin/java"; then
29525        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29527        BOOT_JDK_FOUND=no
29528      else
29529        # Do we have a bin/javac?
29530        if test ! -x "$BOOT_JDK/bin/javac"; then
29531          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29533          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29534$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29535          BOOT_JDK_FOUND=no
29536        else
29537          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29538          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29539
29540          # Extra M4 quote needed to protect [] in grep expression.
29541          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29542          if test "x$FOUND_CORRECT_VERSION" = x; then
29543            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29545            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29546$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29547            BOOT_JDK_FOUND=no
29548          else
29549            # We're done! :-)
29550            BOOT_JDK_FOUND=yes
29551
29552  # Only process if variable expands to non-empty
29553
29554  if test "x$BOOT_JDK" != x; then
29555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29556
29557  # Input might be given as Windows format, start by converting to
29558  # unix format.
29559  path="$BOOT_JDK"
29560  new_path=`$CYGPATH -u "$path"`
29561
29562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29565  # "foo.exe" is OK but "foo" is an error.
29566  #
29567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29568  # It is also a way to make sure we got the proper file name for the real test later on.
29569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29570  if test "x$test_shortpath" = x; then
29571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29573    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29574  fi
29575
29576  # Call helper function which possibly converts this using DOS-style short mode.
29577  # If so, the updated path is stored in $new_path.
29578
29579  input_path="$new_path"
29580  # Check if we need to convert this using DOS-style short mode. If the path
29581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29582  # take no chances and rewrite it.
29583  # Note: m4 eats our [], so we need to use [ and ] instead.
29584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29585  if test "x$has_forbidden_chars" != x; then
29586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29590      # Going to short mode and back again did indeed matter. Since short mode is
29591      # case insensitive, let's make it lowercase to improve readability.
29592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29593      # Now convert it back to Unix-style (cygpath)
29594      input_path=`$CYGPATH -u "$shortmode_path"`
29595      new_path="$input_path"
29596    fi
29597  fi
29598
29599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29600  if test "x$test_cygdrive_prefix" = x; then
29601    # As a simple fix, exclude /usr/bin since it's not a real path.
29602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29604      # a path prefixed by /cygdrive for fixpath to work.
29605      new_path="$CYGWIN_ROOT_PATH$input_path"
29606    fi
29607  fi
29608
29609
29610  if test "x$path" != "x$new_path"; then
29611    BOOT_JDK="$new_path"
29612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29614  fi
29615
29616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29617
29618  path="$BOOT_JDK"
29619  has_colon=`$ECHO $path | $GREP ^.:`
29620  new_path="$path"
29621  if test "x$has_colon" = x; then
29622    # Not in mixed or Windows style, start by that.
29623    new_path=`cmd //c echo $path`
29624  fi
29625
29626
29627  input_path="$new_path"
29628  # Check if we need to convert this using DOS-style short mode. If the path
29629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29630  # take no chances and rewrite it.
29631  # Note: m4 eats our [], so we need to use [ and ] instead.
29632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29633  if test "x$has_forbidden_chars" != x; then
29634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29636  fi
29637
29638
29639  windows_path="$new_path"
29640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29641    unix_path=`$CYGPATH -u "$windows_path"`
29642    new_path="$unix_path"
29643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29645    new_path="$unix_path"
29646  fi
29647
29648  if test "x$path" != "x$new_path"; then
29649    BOOT_JDK="$new_path"
29650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29652  fi
29653
29654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29656
29657    else
29658      # We're on a unix platform. Hooray! :)
29659      path="$BOOT_JDK"
29660      has_space=`$ECHO "$path" | $GREP " "`
29661      if test "x$has_space" != x; then
29662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29665      fi
29666
29667      # Use eval to expand a potential ~
29668      eval path="$path"
29669      if test ! -f "$path" && test ! -d "$path"; then
29670        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29671      fi
29672
29673      if test -d "$path"; then
29674        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29675      else
29676        dir="`$DIRNAME "$path"`"
29677        base="`$BASENAME "$path"`"
29678        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29679      fi
29680    fi
29681  fi
29682
29683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29684$as_echo_n "checking for Boot JDK... " >&6; }
29685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29686$as_echo "$BOOT_JDK" >&6; }
29687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29688$as_echo_n "checking Boot JDK version... " >&6; }
29689            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29691$as_echo "$BOOT_JDK_VERSION" >&6; }
29692          fi # end check jdk version
29693        fi # end check javac
29694      fi # end check java
29695    fi # end check boot jdk found
29696  fi
29697
29698
29699  if test "x$BOOT_JDK_FOUND" = xno; then
29700    # Now execute the test
29701
29702  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29703  BOOT_JDK_SUFFIX="/Contents/Home"
29704  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29705  if test "x$ALL_JDKS_FOUND" != x; then
29706    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29707
29708  if test "x$BOOT_JDK_FOUND" = xno; then
29709    # Now execute the test
29710
29711        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29712        if test -d "$BOOT_JDK"; then
29713          BOOT_JDK_FOUND=maybe
29714          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29715$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29716        fi
29717
29718
29719    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29720    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29721      # Do we have a bin/java?
29722      if test ! -x "$BOOT_JDK/bin/java"; then
29723        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29725        BOOT_JDK_FOUND=no
29726      else
29727        # Do we have a bin/javac?
29728        if test ! -x "$BOOT_JDK/bin/javac"; then
29729          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29731          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29732$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29733          BOOT_JDK_FOUND=no
29734        else
29735          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29736          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29737
29738          # Extra M4 quote needed to protect [] in grep expression.
29739          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29740          if test "x$FOUND_CORRECT_VERSION" = x; then
29741            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29743            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29744$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29745            BOOT_JDK_FOUND=no
29746          else
29747            # We're done! :-)
29748            BOOT_JDK_FOUND=yes
29749
29750  # Only process if variable expands to non-empty
29751
29752  if test "x$BOOT_JDK" != x; then
29753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29754
29755  # Input might be given as Windows format, start by converting to
29756  # unix format.
29757  path="$BOOT_JDK"
29758  new_path=`$CYGPATH -u "$path"`
29759
29760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29763  # "foo.exe" is OK but "foo" is an error.
29764  #
29765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29766  # It is also a way to make sure we got the proper file name for the real test later on.
29767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29768  if test "x$test_shortpath" = x; then
29769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29771    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29772  fi
29773
29774  # Call helper function which possibly converts this using DOS-style short mode.
29775  # If so, the updated path is stored in $new_path.
29776
29777  input_path="$new_path"
29778  # Check if we need to convert this using DOS-style short mode. If the path
29779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29780  # take no chances and rewrite it.
29781  # Note: m4 eats our [], so we need to use [ and ] instead.
29782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29783  if test "x$has_forbidden_chars" != x; then
29784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29788      # Going to short mode and back again did indeed matter. Since short mode is
29789      # case insensitive, let's make it lowercase to improve readability.
29790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29791      # Now convert it back to Unix-style (cygpath)
29792      input_path=`$CYGPATH -u "$shortmode_path"`
29793      new_path="$input_path"
29794    fi
29795  fi
29796
29797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29798  if test "x$test_cygdrive_prefix" = x; then
29799    # As a simple fix, exclude /usr/bin since it's not a real path.
29800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29802      # a path prefixed by /cygdrive for fixpath to work.
29803      new_path="$CYGWIN_ROOT_PATH$input_path"
29804    fi
29805  fi
29806
29807
29808  if test "x$path" != "x$new_path"; then
29809    BOOT_JDK="$new_path"
29810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29812  fi
29813
29814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29815
29816  path="$BOOT_JDK"
29817  has_colon=`$ECHO $path | $GREP ^.:`
29818  new_path="$path"
29819  if test "x$has_colon" = x; then
29820    # Not in mixed or Windows style, start by that.
29821    new_path=`cmd //c echo $path`
29822  fi
29823
29824
29825  input_path="$new_path"
29826  # Check if we need to convert this using DOS-style short mode. If the path
29827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29828  # take no chances and rewrite it.
29829  # Note: m4 eats our [], so we need to use [ and ] instead.
29830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29831  if test "x$has_forbidden_chars" != x; then
29832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29834  fi
29835
29836
29837  windows_path="$new_path"
29838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29839    unix_path=`$CYGPATH -u "$windows_path"`
29840    new_path="$unix_path"
29841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29843    new_path="$unix_path"
29844  fi
29845
29846  if test "x$path" != "x$new_path"; then
29847    BOOT_JDK="$new_path"
29848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29850  fi
29851
29852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29854
29855    else
29856      # We're on a unix platform. Hooray! :)
29857      path="$BOOT_JDK"
29858      has_space=`$ECHO "$path" | $GREP " "`
29859      if test "x$has_space" != x; then
29860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29863      fi
29864
29865      # Use eval to expand a potential ~
29866      eval path="$path"
29867      if test ! -f "$path" && test ! -d "$path"; then
29868        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29869      fi
29870
29871      if test -d "$path"; then
29872        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29873      else
29874        dir="`$DIRNAME "$path"`"
29875        base="`$BASENAME "$path"`"
29876        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29877      fi
29878    fi
29879  fi
29880
29881            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29882$as_echo_n "checking for Boot JDK... " >&6; }
29883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29884$as_echo "$BOOT_JDK" >&6; }
29885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29886$as_echo_n "checking Boot JDK version... " >&6; }
29887            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29889$as_echo "$BOOT_JDK_VERSION" >&6; }
29890          fi # end check jdk version
29891        fi # end check javac
29892      fi # end check java
29893    fi # end check boot jdk found
29894  fi
29895
29896    done
29897  fi
29898
29899
29900    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29901    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29902      # Do we have a bin/java?
29903      if test ! -x "$BOOT_JDK/bin/java"; then
29904        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29906        BOOT_JDK_FOUND=no
29907      else
29908        # Do we have a bin/javac?
29909        if test ! -x "$BOOT_JDK/bin/javac"; then
29910          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29912          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29913$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29914          BOOT_JDK_FOUND=no
29915        else
29916          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29917          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29918
29919          # Extra M4 quote needed to protect [] in grep expression.
29920          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29921          if test "x$FOUND_CORRECT_VERSION" = x; then
29922            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29924            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29925$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29926            BOOT_JDK_FOUND=no
29927          else
29928            # We're done! :-)
29929            BOOT_JDK_FOUND=yes
29930
29931  # Only process if variable expands to non-empty
29932
29933  if test "x$BOOT_JDK" != x; then
29934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29935
29936  # Input might be given as Windows format, start by converting to
29937  # unix format.
29938  path="$BOOT_JDK"
29939  new_path=`$CYGPATH -u "$path"`
29940
29941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29944  # "foo.exe" is OK but "foo" is an error.
29945  #
29946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29947  # It is also a way to make sure we got the proper file name for the real test later on.
29948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29949  if test "x$test_shortpath" = x; then
29950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29953  fi
29954
29955  # Call helper function which possibly converts this using DOS-style short mode.
29956  # If so, the updated path is stored in $new_path.
29957
29958  input_path="$new_path"
29959  # Check if we need to convert this using DOS-style short mode. If the path
29960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29961  # take no chances and rewrite it.
29962  # Note: m4 eats our [], so we need to use [ and ] instead.
29963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29964  if test "x$has_forbidden_chars" != x; then
29965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29969      # Going to short mode and back again did indeed matter. Since short mode is
29970      # case insensitive, let's make it lowercase to improve readability.
29971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29972      # Now convert it back to Unix-style (cygpath)
29973      input_path=`$CYGPATH -u "$shortmode_path"`
29974      new_path="$input_path"
29975    fi
29976  fi
29977
29978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29979  if test "x$test_cygdrive_prefix" = x; then
29980    # As a simple fix, exclude /usr/bin since it's not a real path.
29981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29983      # a path prefixed by /cygdrive for fixpath to work.
29984      new_path="$CYGWIN_ROOT_PATH$input_path"
29985    fi
29986  fi
29987
29988
29989  if test "x$path" != "x$new_path"; then
29990    BOOT_JDK="$new_path"
29991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29993  fi
29994
29995    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29996
29997  path="$BOOT_JDK"
29998  has_colon=`$ECHO $path | $GREP ^.:`
29999  new_path="$path"
30000  if test "x$has_colon" = x; then
30001    # Not in mixed or Windows style, start by that.
30002    new_path=`cmd //c echo $path`
30003  fi
30004
30005
30006  input_path="$new_path"
30007  # Check if we need to convert this using DOS-style short mode. If the path
30008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30009  # take no chances and rewrite it.
30010  # Note: m4 eats our [], so we need to use [ and ] instead.
30011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30012  if test "x$has_forbidden_chars" != x; then
30013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30015  fi
30016
30017
30018  windows_path="$new_path"
30019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30020    unix_path=`$CYGPATH -u "$windows_path"`
30021    new_path="$unix_path"
30022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30024    new_path="$unix_path"
30025  fi
30026
30027  if test "x$path" != "x$new_path"; then
30028    BOOT_JDK="$new_path"
30029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30031  fi
30032
30033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30035
30036    else
30037      # We're on a unix platform. Hooray! :)
30038      path="$BOOT_JDK"
30039      has_space=`$ECHO "$path" | $GREP " "`
30040      if test "x$has_space" != x; then
30041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30043        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30044      fi
30045
30046      # Use eval to expand a potential ~
30047      eval path="$path"
30048      if test ! -f "$path" && test ! -d "$path"; then
30049        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30050      fi
30051
30052      if test -d "$path"; then
30053        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30054      else
30055        dir="`$DIRNAME "$path"`"
30056        base="`$BASENAME "$path"`"
30057        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30058      fi
30059    fi
30060  fi
30061
30062            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30063$as_echo_n "checking for Boot JDK... " >&6; }
30064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30065$as_echo "$BOOT_JDK" >&6; }
30066            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30067$as_echo_n "checking Boot JDK version... " >&6; }
30068            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30070$as_echo "$BOOT_JDK_VERSION" >&6; }
30071          fi # end check jdk version
30072        fi # end check javac
30073      fi # end check java
30074    fi # end check boot jdk found
30075  fi
30076
30077  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30078
30079  if test "x$BOOT_JDK_FOUND" = xno; then
30080    # Now execute the test
30081
30082  BOOT_JDK_PREFIX="/usr/lib/jvm"
30083  BOOT_JDK_SUFFIX=""
30084  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30085  if test "x$ALL_JDKS_FOUND" != x; then
30086    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30087
30088  if test "x$BOOT_JDK_FOUND" = xno; then
30089    # Now execute the test
30090
30091        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30092        if test -d "$BOOT_JDK"; then
30093          BOOT_JDK_FOUND=maybe
30094          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30095$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30096        fi
30097
30098
30099    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30100    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30101      # Do we have a bin/java?
30102      if test ! -x "$BOOT_JDK/bin/java"; then
30103        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30105        BOOT_JDK_FOUND=no
30106      else
30107        # Do we have a bin/javac?
30108        if test ! -x "$BOOT_JDK/bin/javac"; then
30109          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30111          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30112$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30113          BOOT_JDK_FOUND=no
30114        else
30115          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30116          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30117
30118          # Extra M4 quote needed to protect [] in grep expression.
30119          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30120          if test "x$FOUND_CORRECT_VERSION" = x; then
30121            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30123            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30124$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30125            BOOT_JDK_FOUND=no
30126          else
30127            # We're done! :-)
30128            BOOT_JDK_FOUND=yes
30129
30130  # Only process if variable expands to non-empty
30131
30132  if test "x$BOOT_JDK" != x; then
30133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30134
30135  # Input might be given as Windows format, start by converting to
30136  # unix format.
30137  path="$BOOT_JDK"
30138  new_path=`$CYGPATH -u "$path"`
30139
30140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30143  # "foo.exe" is OK but "foo" is an error.
30144  #
30145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30146  # It is also a way to make sure we got the proper file name for the real test later on.
30147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30148  if test "x$test_shortpath" = x; then
30149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30152  fi
30153
30154  # Call helper function which possibly converts this using DOS-style short mode.
30155  # If so, the updated path is stored in $new_path.
30156
30157  input_path="$new_path"
30158  # Check if we need to convert this using DOS-style short mode. If the path
30159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30160  # take no chances and rewrite it.
30161  # Note: m4 eats our [], so we need to use [ and ] instead.
30162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30163  if test "x$has_forbidden_chars" != x; then
30164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30168      # Going to short mode and back again did indeed matter. Since short mode is
30169      # case insensitive, let's make it lowercase to improve readability.
30170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30171      # Now convert it back to Unix-style (cygpath)
30172      input_path=`$CYGPATH -u "$shortmode_path"`
30173      new_path="$input_path"
30174    fi
30175  fi
30176
30177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30178  if test "x$test_cygdrive_prefix" = x; then
30179    # As a simple fix, exclude /usr/bin since it's not a real path.
30180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30182      # a path prefixed by /cygdrive for fixpath to work.
30183      new_path="$CYGWIN_ROOT_PATH$input_path"
30184    fi
30185  fi
30186
30187
30188  if test "x$path" != "x$new_path"; then
30189    BOOT_JDK="$new_path"
30190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30192  fi
30193
30194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30195
30196  path="$BOOT_JDK"
30197  has_colon=`$ECHO $path | $GREP ^.:`
30198  new_path="$path"
30199  if test "x$has_colon" = x; then
30200    # Not in mixed or Windows style, start by that.
30201    new_path=`cmd //c echo $path`
30202  fi
30203
30204
30205  input_path="$new_path"
30206  # Check if we need to convert this using DOS-style short mode. If the path
30207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30208  # take no chances and rewrite it.
30209  # Note: m4 eats our [], so we need to use [ and ] instead.
30210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30211  if test "x$has_forbidden_chars" != x; then
30212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30214  fi
30215
30216
30217  windows_path="$new_path"
30218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30219    unix_path=`$CYGPATH -u "$windows_path"`
30220    new_path="$unix_path"
30221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30223    new_path="$unix_path"
30224  fi
30225
30226  if test "x$path" != "x$new_path"; then
30227    BOOT_JDK="$new_path"
30228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30230  fi
30231
30232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30234
30235    else
30236      # We're on a unix platform. Hooray! :)
30237      path="$BOOT_JDK"
30238      has_space=`$ECHO "$path" | $GREP " "`
30239      if test "x$has_space" != x; then
30240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30243      fi
30244
30245      # Use eval to expand a potential ~
30246      eval path="$path"
30247      if test ! -f "$path" && test ! -d "$path"; then
30248        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30249      fi
30250
30251      if test -d "$path"; then
30252        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30253      else
30254        dir="`$DIRNAME "$path"`"
30255        base="`$BASENAME "$path"`"
30256        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30257      fi
30258    fi
30259  fi
30260
30261            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30262$as_echo_n "checking for Boot JDK... " >&6; }
30263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30264$as_echo "$BOOT_JDK" >&6; }
30265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30266$as_echo_n "checking Boot JDK version... " >&6; }
30267            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30269$as_echo "$BOOT_JDK_VERSION" >&6; }
30270          fi # end check jdk version
30271        fi # end check javac
30272      fi # end check java
30273    fi # end check boot jdk found
30274  fi
30275
30276    done
30277  fi
30278
30279
30280    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30281    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30282      # Do we have a bin/java?
30283      if test ! -x "$BOOT_JDK/bin/java"; then
30284        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30286        BOOT_JDK_FOUND=no
30287      else
30288        # Do we have a bin/javac?
30289        if test ! -x "$BOOT_JDK/bin/javac"; then
30290          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30292          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30293$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30294          BOOT_JDK_FOUND=no
30295        else
30296          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30297          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30298
30299          # Extra M4 quote needed to protect [] in grep expression.
30300          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30301          if test "x$FOUND_CORRECT_VERSION" = x; then
30302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30304            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30305$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30306            BOOT_JDK_FOUND=no
30307          else
30308            # We're done! :-)
30309            BOOT_JDK_FOUND=yes
30310
30311  # Only process if variable expands to non-empty
30312
30313  if test "x$BOOT_JDK" != x; then
30314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30315
30316  # Input might be given as Windows format, start by converting to
30317  # unix format.
30318  path="$BOOT_JDK"
30319  new_path=`$CYGPATH -u "$path"`
30320
30321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30324  # "foo.exe" is OK but "foo" is an error.
30325  #
30326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30327  # It is also a way to make sure we got the proper file name for the real test later on.
30328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30329  if test "x$test_shortpath" = x; then
30330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30332    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30333  fi
30334
30335  # Call helper function which possibly converts this using DOS-style short mode.
30336  # If so, the updated path is stored in $new_path.
30337
30338  input_path="$new_path"
30339  # Check if we need to convert this using DOS-style short mode. If the path
30340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30341  # take no chances and rewrite it.
30342  # Note: m4 eats our [], so we need to use [ and ] instead.
30343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30344  if test "x$has_forbidden_chars" != x; then
30345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30349      # Going to short mode and back again did indeed matter. Since short mode is
30350      # case insensitive, let's make it lowercase to improve readability.
30351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30352      # Now convert it back to Unix-style (cygpath)
30353      input_path=`$CYGPATH -u "$shortmode_path"`
30354      new_path="$input_path"
30355    fi
30356  fi
30357
30358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30359  if test "x$test_cygdrive_prefix" = x; then
30360    # As a simple fix, exclude /usr/bin since it's not a real path.
30361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30363      # a path prefixed by /cygdrive for fixpath to work.
30364      new_path="$CYGWIN_ROOT_PATH$input_path"
30365    fi
30366  fi
30367
30368
30369  if test "x$path" != "x$new_path"; then
30370    BOOT_JDK="$new_path"
30371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30373  fi
30374
30375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30376
30377  path="$BOOT_JDK"
30378  has_colon=`$ECHO $path | $GREP ^.:`
30379  new_path="$path"
30380  if test "x$has_colon" = x; then
30381    # Not in mixed or Windows style, start by that.
30382    new_path=`cmd //c echo $path`
30383  fi
30384
30385
30386  input_path="$new_path"
30387  # Check if we need to convert this using DOS-style short mode. If the path
30388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30389  # take no chances and rewrite it.
30390  # Note: m4 eats our [], so we need to use [ and ] instead.
30391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30392  if test "x$has_forbidden_chars" != x; then
30393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30395  fi
30396
30397
30398  windows_path="$new_path"
30399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30400    unix_path=`$CYGPATH -u "$windows_path"`
30401    new_path="$unix_path"
30402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30404    new_path="$unix_path"
30405  fi
30406
30407  if test "x$path" != "x$new_path"; then
30408    BOOT_JDK="$new_path"
30409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30411  fi
30412
30413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30415
30416    else
30417      # We're on a unix platform. Hooray! :)
30418      path="$BOOT_JDK"
30419      has_space=`$ECHO "$path" | $GREP " "`
30420      if test "x$has_space" != x; then
30421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30424      fi
30425
30426      # Use eval to expand a potential ~
30427      eval path="$path"
30428      if test ! -f "$path" && test ! -d "$path"; then
30429        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30430      fi
30431
30432      if test -d "$path"; then
30433        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30434      else
30435        dir="`$DIRNAME "$path"`"
30436        base="`$BASENAME "$path"`"
30437        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30438      fi
30439    fi
30440  fi
30441
30442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30443$as_echo_n "checking for Boot JDK... " >&6; }
30444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30445$as_echo "$BOOT_JDK" >&6; }
30446            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30447$as_echo_n "checking Boot JDK version... " >&6; }
30448            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30450$as_echo "$BOOT_JDK_VERSION" >&6; }
30451          fi # end check jdk version
30452        fi # end check javac
30453      fi # end check java
30454    fi # end check boot jdk found
30455  fi
30456
30457  fi
30458
30459
30460    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30461    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30462      # Do we have a bin/java?
30463      if test ! -x "$BOOT_JDK/bin/java"; then
30464        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30466        BOOT_JDK_FOUND=no
30467      else
30468        # Do we have a bin/javac?
30469        if test ! -x "$BOOT_JDK/bin/javac"; then
30470          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30472          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30473$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30474          BOOT_JDK_FOUND=no
30475        else
30476          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30477          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30478
30479          # Extra M4 quote needed to protect [] in grep expression.
30480          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30481          if test "x$FOUND_CORRECT_VERSION" = x; then
30482            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30484            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30485$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30486            BOOT_JDK_FOUND=no
30487          else
30488            # We're done! :-)
30489            BOOT_JDK_FOUND=yes
30490
30491  # Only process if variable expands to non-empty
30492
30493  if test "x$BOOT_JDK" != x; then
30494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30495
30496  # Input might be given as Windows format, start by converting to
30497  # unix format.
30498  path="$BOOT_JDK"
30499  new_path=`$CYGPATH -u "$path"`
30500
30501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30504  # "foo.exe" is OK but "foo" is an error.
30505  #
30506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30507  # It is also a way to make sure we got the proper file name for the real test later on.
30508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30509  if test "x$test_shortpath" = x; then
30510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30512    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30513  fi
30514
30515  # Call helper function which possibly converts this using DOS-style short mode.
30516  # If so, the updated path is stored in $new_path.
30517
30518  input_path="$new_path"
30519  # Check if we need to convert this using DOS-style short mode. If the path
30520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30521  # take no chances and rewrite it.
30522  # Note: m4 eats our [], so we need to use [ and ] instead.
30523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30524  if test "x$has_forbidden_chars" != x; then
30525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30529      # Going to short mode and back again did indeed matter. Since short mode is
30530      # case insensitive, let's make it lowercase to improve readability.
30531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30532      # Now convert it back to Unix-style (cygpath)
30533      input_path=`$CYGPATH -u "$shortmode_path"`
30534      new_path="$input_path"
30535    fi
30536  fi
30537
30538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30539  if test "x$test_cygdrive_prefix" = x; then
30540    # As a simple fix, exclude /usr/bin since it's not a real path.
30541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30543      # a path prefixed by /cygdrive for fixpath to work.
30544      new_path="$CYGWIN_ROOT_PATH$input_path"
30545    fi
30546  fi
30547
30548
30549  if test "x$path" != "x$new_path"; then
30550    BOOT_JDK="$new_path"
30551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30553  fi
30554
30555    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30556
30557  path="$BOOT_JDK"
30558  has_colon=`$ECHO $path | $GREP ^.:`
30559  new_path="$path"
30560  if test "x$has_colon" = x; then
30561    # Not in mixed or Windows style, start by that.
30562    new_path=`cmd //c echo $path`
30563  fi
30564
30565
30566  input_path="$new_path"
30567  # Check if we need to convert this using DOS-style short mode. If the path
30568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30569  # take no chances and rewrite it.
30570  # Note: m4 eats our [], so we need to use [ and ] instead.
30571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30572  if test "x$has_forbidden_chars" != x; then
30573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30575  fi
30576
30577
30578  windows_path="$new_path"
30579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30580    unix_path=`$CYGPATH -u "$windows_path"`
30581    new_path="$unix_path"
30582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30584    new_path="$unix_path"
30585  fi
30586
30587  if test "x$path" != "x$new_path"; then
30588    BOOT_JDK="$new_path"
30589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30591  fi
30592
30593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30595
30596    else
30597      # We're on a unix platform. Hooray! :)
30598      path="$BOOT_JDK"
30599      has_space=`$ECHO "$path" | $GREP " "`
30600      if test "x$has_space" != x; then
30601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30603        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30604      fi
30605
30606      # Use eval to expand a potential ~
30607      eval path="$path"
30608      if test ! -f "$path" && test ! -d "$path"; then
30609        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30610      fi
30611
30612      if test -d "$path"; then
30613        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30614      else
30615        dir="`$DIRNAME "$path"`"
30616        base="`$BASENAME "$path"`"
30617        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30618      fi
30619    fi
30620  fi
30621
30622            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30623$as_echo_n "checking for Boot JDK... " >&6; }
30624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30625$as_echo "$BOOT_JDK" >&6; }
30626            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30627$as_echo_n "checking Boot JDK version... " >&6; }
30628            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30630$as_echo "$BOOT_JDK_VERSION" >&6; }
30631          fi # end check jdk version
30632        fi # end check javac
30633      fi # end check java
30634    fi # end check boot jdk found
30635  fi
30636
30637
30638  # If we haven't found anything yet, we've truly lost. Give up.
30639  if test "x$BOOT_JDK_FOUND" = xno; then
30640
30641  # Print a helpful message on how to acquire the necessary build dependency.
30642  # openjdk is the help tag: freetype, cups, alsa etc
30643  MISSING_DEPENDENCY=openjdk
30644
30645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30646    cygwin_help $MISSING_DEPENDENCY
30647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30648    msys_help $MISSING_DEPENDENCY
30649  else
30650    PKGHANDLER_COMMAND=
30651
30652    case $PKGHANDLER in
30653      apt-get)
30654        apt_help     $MISSING_DEPENDENCY ;;
30655      yum)
30656        yum_help     $MISSING_DEPENDENCY ;;
30657      brew)
30658        brew_help    $MISSING_DEPENDENCY ;;
30659      port)
30660        port_help    $MISSING_DEPENDENCY ;;
30661      pkgutil)
30662        pkgutil_help $MISSING_DEPENDENCY ;;
30663      pkgadd)
30664        pkgadd_help  $MISSING_DEPENDENCY ;;
30665    esac
30666
30667    if test "x$PKGHANDLER_COMMAND" != x; then
30668      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30669    fi
30670  fi
30671
30672    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30673$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30674    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30675$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30676    as_fn_error $? "Cannot continue" "$LINENO" 5
30677  fi
30678
30679
30680
30681  # Setup tools from the Boot JDK.
30682
30683  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30684
30685  # Publish this variable in the help.
30686
30687
30688  if [ -z "${JAVA+x}" ]; then
30689    # The variable is not set by user, try to locate tool using the code snippet
30690
30691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30692$as_echo_n "checking for java in Boot JDK... " >&6; }
30693      JAVA=$BOOT_JDK/bin/java
30694      if test ! -x $JAVA; then
30695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30696$as_echo "not found" >&6; }
30697        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30698$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30699        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30700      fi
30701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30702$as_echo "ok" >&6; }
30703
30704
30705  else
30706    # The variable is set, but is it from the command line or the environment?
30707
30708    # Try to remove the string !JAVA! from our list.
30709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30711      # If it failed, the variable was not from the command line. Ignore it,
30712      # but warn the user (except for BASH, which is always set by the calling BASH).
30713      if test "xJAVA" != xBASH; then
30714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30715$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30716      fi
30717      # Try to locate tool using the code snippet
30718
30719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30720$as_echo_n "checking for java in Boot JDK... " >&6; }
30721      JAVA=$BOOT_JDK/bin/java
30722      if test ! -x $JAVA; then
30723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30724$as_echo "not found" >&6; }
30725        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30726$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30727        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30728      fi
30729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30730$as_echo "ok" >&6; }
30731
30732
30733    else
30734      # If it succeeded, then it was overridden by the user. We will use it
30735      # for the tool.
30736
30737      # First remove it from the list of overridden variables, so we can test
30738      # for unknown variables in the end.
30739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30740
30741      # Check if we try to supply an empty value
30742      if test "x$JAVA" = x; then
30743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30744$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30746$as_echo_n "checking for JAVA... " >&6; }
30747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30748$as_echo "disabled" >&6; }
30749      else
30750        # Check if the provided tool contains a complete path.
30751        tool_specified="$JAVA"
30752        tool_basename="${tool_specified##*/}"
30753        if test "x$tool_basename" = "x$tool_specified"; then
30754          # A command without a complete path is provided, search $PATH.
30755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30756$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30757          # Extract the first word of "$tool_basename", so it can be a program name with args.
30758set dummy $tool_basename; ac_word=$2
30759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30760$as_echo_n "checking for $ac_word... " >&6; }
30761if ${ac_cv_path_JAVA+:} false; then :
30762  $as_echo_n "(cached) " >&6
30763else
30764  case $JAVA in
30765  [\\/]* | ?:[\\/]*)
30766  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30767  ;;
30768  *)
30769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30770for as_dir in $PATH
30771do
30772  IFS=$as_save_IFS
30773  test -z "$as_dir" && as_dir=.
30774    for ac_exec_ext in '' $ac_executable_extensions; do
30775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30776    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30778    break 2
30779  fi
30780done
30781  done
30782IFS=$as_save_IFS
30783
30784  ;;
30785esac
30786fi
30787JAVA=$ac_cv_path_JAVA
30788if test -n "$JAVA"; then
30789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30790$as_echo "$JAVA" >&6; }
30791else
30792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30793$as_echo "no" >&6; }
30794fi
30795
30796
30797          if test "x$JAVA" = x; then
30798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30799          fi
30800        else
30801          # Otherwise we believe it is a complete path. Use it as it is.
30802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30803$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30805$as_echo_n "checking for JAVA... " >&6; }
30806          if test ! -x "$tool_specified"; then
30807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30808$as_echo "not found" >&6; }
30809            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30810          fi
30811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30812$as_echo "$tool_specified" >&6; }
30813        fi
30814      fi
30815    fi
30816
30817  fi
30818
30819
30820
30821  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30822
30823  # Publish this variable in the help.
30824
30825
30826  if [ -z "${JAVAC+x}" ]; then
30827    # The variable is not set by user, try to locate tool using the code snippet
30828
30829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30830$as_echo_n "checking for javac in Boot JDK... " >&6; }
30831      JAVAC=$BOOT_JDK/bin/javac
30832      if test ! -x $JAVAC; then
30833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30834$as_echo "not found" >&6; }
30835        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30836$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30837        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30838      fi
30839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30840$as_echo "ok" >&6; }
30841
30842
30843  else
30844    # The variable is set, but is it from the command line or the environment?
30845
30846    # Try to remove the string !JAVAC! from our list.
30847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30849      # If it failed, the variable was not from the command line. Ignore it,
30850      # but warn the user (except for BASH, which is always set by the calling BASH).
30851      if test "xJAVAC" != xBASH; then
30852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30853$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30854      fi
30855      # Try to locate tool using the code snippet
30856
30857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30858$as_echo_n "checking for javac in Boot JDK... " >&6; }
30859      JAVAC=$BOOT_JDK/bin/javac
30860      if test ! -x $JAVAC; then
30861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30862$as_echo "not found" >&6; }
30863        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30864$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30865        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30866      fi
30867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30868$as_echo "ok" >&6; }
30869
30870
30871    else
30872      # If it succeeded, then it was overridden by the user. We will use it
30873      # for the tool.
30874
30875      # First remove it from the list of overridden variables, so we can test
30876      # for unknown variables in the end.
30877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30878
30879      # Check if we try to supply an empty value
30880      if test "x$JAVAC" = x; then
30881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30882$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30884$as_echo_n "checking for JAVAC... " >&6; }
30885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30886$as_echo "disabled" >&6; }
30887      else
30888        # Check if the provided tool contains a complete path.
30889        tool_specified="$JAVAC"
30890        tool_basename="${tool_specified##*/}"
30891        if test "x$tool_basename" = "x$tool_specified"; then
30892          # A command without a complete path is provided, search $PATH.
30893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30894$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30895          # Extract the first word of "$tool_basename", so it can be a program name with args.
30896set dummy $tool_basename; ac_word=$2
30897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30898$as_echo_n "checking for $ac_word... " >&6; }
30899if ${ac_cv_path_JAVAC+:} false; then :
30900  $as_echo_n "(cached) " >&6
30901else
30902  case $JAVAC in
30903  [\\/]* | ?:[\\/]*)
30904  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30905  ;;
30906  *)
30907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30908for as_dir in $PATH
30909do
30910  IFS=$as_save_IFS
30911  test -z "$as_dir" && as_dir=.
30912    for ac_exec_ext in '' $ac_executable_extensions; do
30913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30914    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30916    break 2
30917  fi
30918done
30919  done
30920IFS=$as_save_IFS
30921
30922  ;;
30923esac
30924fi
30925JAVAC=$ac_cv_path_JAVAC
30926if test -n "$JAVAC"; then
30927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30928$as_echo "$JAVAC" >&6; }
30929else
30930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30931$as_echo "no" >&6; }
30932fi
30933
30934
30935          if test "x$JAVAC" = x; then
30936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30937          fi
30938        else
30939          # Otherwise we believe it is a complete path. Use it as it is.
30940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30941$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30943$as_echo_n "checking for JAVAC... " >&6; }
30944          if test ! -x "$tool_specified"; then
30945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30946$as_echo "not found" >&6; }
30947            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30948          fi
30949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30950$as_echo "$tool_specified" >&6; }
30951        fi
30952      fi
30953    fi
30954
30955  fi
30956
30957
30958
30959  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30960
30961  # Publish this variable in the help.
30962
30963
30964  if [ -z "${JAVAH+x}" ]; then
30965    # The variable is not set by user, try to locate tool using the code snippet
30966
30967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30968$as_echo_n "checking for javah in Boot JDK... " >&6; }
30969      JAVAH=$BOOT_JDK/bin/javah
30970      if test ! -x $JAVAH; then
30971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30972$as_echo "not found" >&6; }
30973        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30974$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30975        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30976      fi
30977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30978$as_echo "ok" >&6; }
30979
30980
30981  else
30982    # The variable is set, but is it from the command line or the environment?
30983
30984    # Try to remove the string !JAVAH! from our list.
30985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30987      # If it failed, the variable was not from the command line. Ignore it,
30988      # but warn the user (except for BASH, which is always set by the calling BASH).
30989      if test "xJAVAH" != xBASH; then
30990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30991$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30992      fi
30993      # Try to locate tool using the code snippet
30994
30995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30996$as_echo_n "checking for javah in Boot JDK... " >&6; }
30997      JAVAH=$BOOT_JDK/bin/javah
30998      if test ! -x $JAVAH; then
30999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31000$as_echo "not found" >&6; }
31001        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31002$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31003        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31004      fi
31005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31006$as_echo "ok" >&6; }
31007
31008
31009    else
31010      # If it succeeded, then it was overridden by the user. We will use it
31011      # for the tool.
31012
31013      # First remove it from the list of overridden variables, so we can test
31014      # for unknown variables in the end.
31015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31016
31017      # Check if we try to supply an empty value
31018      if test "x$JAVAH" = x; then
31019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31020$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31022$as_echo_n "checking for JAVAH... " >&6; }
31023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31024$as_echo "disabled" >&6; }
31025      else
31026        # Check if the provided tool contains a complete path.
31027        tool_specified="$JAVAH"
31028        tool_basename="${tool_specified##*/}"
31029        if test "x$tool_basename" = "x$tool_specified"; then
31030          # A command without a complete path is provided, search $PATH.
31031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31032$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31033          # Extract the first word of "$tool_basename", so it can be a program name with args.
31034set dummy $tool_basename; ac_word=$2
31035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31036$as_echo_n "checking for $ac_word... " >&6; }
31037if ${ac_cv_path_JAVAH+:} false; then :
31038  $as_echo_n "(cached) " >&6
31039else
31040  case $JAVAH in
31041  [\\/]* | ?:[\\/]*)
31042  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31043  ;;
31044  *)
31045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31046for as_dir in $PATH
31047do
31048  IFS=$as_save_IFS
31049  test -z "$as_dir" && as_dir=.
31050    for ac_exec_ext in '' $ac_executable_extensions; do
31051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31052    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31054    break 2
31055  fi
31056done
31057  done
31058IFS=$as_save_IFS
31059
31060  ;;
31061esac
31062fi
31063JAVAH=$ac_cv_path_JAVAH
31064if test -n "$JAVAH"; then
31065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31066$as_echo "$JAVAH" >&6; }
31067else
31068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31069$as_echo "no" >&6; }
31070fi
31071
31072
31073          if test "x$JAVAH" = x; then
31074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31075          fi
31076        else
31077          # Otherwise we believe it is a complete path. Use it as it is.
31078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31079$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31081$as_echo_n "checking for JAVAH... " >&6; }
31082          if test ! -x "$tool_specified"; then
31083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31084$as_echo "not found" >&6; }
31085            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31086          fi
31087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31088$as_echo "$tool_specified" >&6; }
31089        fi
31090      fi
31091    fi
31092
31093  fi
31094
31095
31096
31097  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31098
31099  # Publish this variable in the help.
31100
31101
31102  if [ -z "${JAR+x}" ]; then
31103    # The variable is not set by user, try to locate tool using the code snippet
31104
31105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31106$as_echo_n "checking for jar in Boot JDK... " >&6; }
31107      JAR=$BOOT_JDK/bin/jar
31108      if test ! -x $JAR; then
31109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31110$as_echo "not found" >&6; }
31111        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31112$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31113        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31114      fi
31115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31116$as_echo "ok" >&6; }
31117
31118
31119  else
31120    # The variable is set, but is it from the command line or the environment?
31121
31122    # Try to remove the string !JAR! from our list.
31123    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31124    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31125      # If it failed, the variable was not from the command line. Ignore it,
31126      # but warn the user (except for BASH, which is always set by the calling BASH).
31127      if test "xJAR" != xBASH; then
31128        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31129$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31130      fi
31131      # Try to locate tool using the code snippet
31132
31133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31134$as_echo_n "checking for jar in Boot JDK... " >&6; }
31135      JAR=$BOOT_JDK/bin/jar
31136      if test ! -x $JAR; then
31137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31138$as_echo "not found" >&6; }
31139        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31140$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31141        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31142      fi
31143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31144$as_echo "ok" >&6; }
31145
31146
31147    else
31148      # If it succeeded, then it was overridden by the user. We will use it
31149      # for the tool.
31150
31151      # First remove it from the list of overridden variables, so we can test
31152      # for unknown variables in the end.
31153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31154
31155      # Check if we try to supply an empty value
31156      if test "x$JAR" = x; then
31157        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31158$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31160$as_echo_n "checking for JAR... " >&6; }
31161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31162$as_echo "disabled" >&6; }
31163      else
31164        # Check if the provided tool contains a complete path.
31165        tool_specified="$JAR"
31166        tool_basename="${tool_specified##*/}"
31167        if test "x$tool_basename" = "x$tool_specified"; then
31168          # A command without a complete path is provided, search $PATH.
31169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31170$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31171          # Extract the first word of "$tool_basename", so it can be a program name with args.
31172set dummy $tool_basename; ac_word=$2
31173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31174$as_echo_n "checking for $ac_word... " >&6; }
31175if ${ac_cv_path_JAR+:} false; then :
31176  $as_echo_n "(cached) " >&6
31177else
31178  case $JAR in
31179  [\\/]* | ?:[\\/]*)
31180  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31181  ;;
31182  *)
31183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31184for as_dir in $PATH
31185do
31186  IFS=$as_save_IFS
31187  test -z "$as_dir" && as_dir=.
31188    for ac_exec_ext in '' $ac_executable_extensions; do
31189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31190    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31192    break 2
31193  fi
31194done
31195  done
31196IFS=$as_save_IFS
31197
31198  ;;
31199esac
31200fi
31201JAR=$ac_cv_path_JAR
31202if test -n "$JAR"; then
31203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31204$as_echo "$JAR" >&6; }
31205else
31206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31207$as_echo "no" >&6; }
31208fi
31209
31210
31211          if test "x$JAR" = x; then
31212            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31213          fi
31214        else
31215          # Otherwise we believe it is a complete path. Use it as it is.
31216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31217$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31218          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31219$as_echo_n "checking for JAR... " >&6; }
31220          if test ! -x "$tool_specified"; then
31221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31222$as_echo "not found" >&6; }
31223            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31224          fi
31225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31226$as_echo "$tool_specified" >&6; }
31227        fi
31228      fi
31229    fi
31230
31231  fi
31232
31233
31234
31235  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31236
31237  # Publish this variable in the help.
31238
31239
31240  if [ -z "${JARSIGNER+x}" ]; then
31241    # The variable is not set by user, try to locate tool using the code snippet
31242
31243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31244$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31245      JARSIGNER=$BOOT_JDK/bin/jarsigner
31246      if test ! -x $JARSIGNER; then
31247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31248$as_echo "not found" >&6; }
31249        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31250$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31251        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31252      fi
31253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31254$as_echo "ok" >&6; }
31255
31256
31257  else
31258    # The variable is set, but is it from the command line or the environment?
31259
31260    # Try to remove the string !JARSIGNER! from our list.
31261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31263      # If it failed, the variable was not from the command line. Ignore it,
31264      # but warn the user (except for BASH, which is always set by the calling BASH).
31265      if test "xJARSIGNER" != xBASH; then
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31267$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31268      fi
31269      # Try to locate tool using the code snippet
31270
31271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31272$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31273      JARSIGNER=$BOOT_JDK/bin/jarsigner
31274      if test ! -x $JARSIGNER; then
31275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31276$as_echo "not found" >&6; }
31277        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31278$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31279        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31280      fi
31281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31282$as_echo "ok" >&6; }
31283
31284
31285    else
31286      # If it succeeded, then it was overridden by the user. We will use it
31287      # for the tool.
31288
31289      # First remove it from the list of overridden variables, so we can test
31290      # for unknown variables in the end.
31291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31292
31293      # Check if we try to supply an empty value
31294      if test "x$JARSIGNER" = x; then
31295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31296$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31298$as_echo_n "checking for JARSIGNER... " >&6; }
31299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31300$as_echo "disabled" >&6; }
31301      else
31302        # Check if the provided tool contains a complete path.
31303        tool_specified="$JARSIGNER"
31304        tool_basename="${tool_specified##*/}"
31305        if test "x$tool_basename" = "x$tool_specified"; then
31306          # A command without a complete path is provided, search $PATH.
31307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31308$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31309          # Extract the first word of "$tool_basename", so it can be a program name with args.
31310set dummy $tool_basename; ac_word=$2
31311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31312$as_echo_n "checking for $ac_word... " >&6; }
31313if ${ac_cv_path_JARSIGNER+:} false; then :
31314  $as_echo_n "(cached) " >&6
31315else
31316  case $JARSIGNER in
31317  [\\/]* | ?:[\\/]*)
31318  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31319  ;;
31320  *)
31321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31322for as_dir in $PATH
31323do
31324  IFS=$as_save_IFS
31325  test -z "$as_dir" && as_dir=.
31326    for ac_exec_ext in '' $ac_executable_extensions; do
31327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31328    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31330    break 2
31331  fi
31332done
31333  done
31334IFS=$as_save_IFS
31335
31336  ;;
31337esac
31338fi
31339JARSIGNER=$ac_cv_path_JARSIGNER
31340if test -n "$JARSIGNER"; then
31341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31342$as_echo "$JARSIGNER" >&6; }
31343else
31344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31345$as_echo "no" >&6; }
31346fi
31347
31348
31349          if test "x$JARSIGNER" = x; then
31350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31351          fi
31352        else
31353          # Otherwise we believe it is a complete path. Use it as it is.
31354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31355$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31357$as_echo_n "checking for JARSIGNER... " >&6; }
31358          if test ! -x "$tool_specified"; then
31359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31360$as_echo "not found" >&6; }
31361            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31362          fi
31363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31364$as_echo "$tool_specified" >&6; }
31365        fi
31366      fi
31367    fi
31368
31369  fi
31370
31371
31372
31373  # Finally, set some other options...
31374
31375  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31376  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31377
31378
31379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31380$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31381  if "$JAVA" --list-modules > /dev/null 2>&1; then
31382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31383$as_echo "yes" >&6; }
31384    BOOT_JDK_MODULAR="true"
31385  else
31386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31387$as_echo "no" >&6; }
31388    BOOT_JDK_MODULAR="false"
31389  fi
31390
31391
31392
31393
31394  # Check if the boot jdk is 32 or 64 bit
31395  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31396    BOOT_JDK_BITS="64"
31397  else
31398    BOOT_JDK_BITS="32"
31399  fi
31400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31401$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31403$as_echo "$BOOT_JDK_BITS" >&6; }
31404
31405
31406
31407# Check whether --with-build-jdk was given.
31408if test "${with_build_jdk+set}" = set; then :
31409  withval=$with_build_jdk;
31410fi
31411
31412
31413  CREATE_BUILDJDK=false
31414  EXTERNAL_BUILDJDK=false
31415  BUILD_JDK_FOUND="no"
31416  if test "x$with_build_jdk" != "x"; then
31417
31418  if test "x$BUILD_JDK_FOUND" = xno; then
31419    # Execute the test
31420
31421       if test "x$with_build_jdk" != x; then
31422         BUILD_JDK=$with_build_jdk
31423         BUILD_JDK_FOUND=maybe
31424         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31425$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31426       fi
31427
31428    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31429    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31430      # Do we have a bin/java?
31431      if test ! -x "$BUILD_JDK/bin/java"; then
31432        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31433$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31434        BUILD_JDK_FOUND=no
31435      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31437$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31438        BUILD_JDK_FOUND=no
31439      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31441$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31442        BUILD_JDK_FOUND=no
31443      elif test ! -x "$BUILD_JDK/bin/javac"; then
31444        # Do we have a bin/javac?
31445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31446$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31447        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31448$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31449        BUILD_JDK_FOUND=no
31450      else
31451        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31452        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31453
31454        # Extra M4 quote needed to protect [] in grep expression.
31455        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31456        if test "x$FOUND_CORRECT_VERSION" = x; then
31457          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31458$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31459          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31460$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31461          BUILD_JDK_FOUND=no
31462        else
31463          # We're done!
31464          BUILD_JDK_FOUND=yes
31465
31466  # Only process if variable expands to non-empty
31467
31468  if test "x$BUILD_JDK" != x; then
31469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31470
31471  # Input might be given as Windows format, start by converting to
31472  # unix format.
31473  path="$BUILD_JDK"
31474  new_path=`$CYGPATH -u "$path"`
31475
31476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31479  # "foo.exe" is OK but "foo" is an error.
31480  #
31481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31482  # It is also a way to make sure we got the proper file name for the real test later on.
31483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31484  if test "x$test_shortpath" = x; then
31485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31486$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31487    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31488  fi
31489
31490  # Call helper function which possibly converts this using DOS-style short mode.
31491  # If so, the updated path is stored in $new_path.
31492
31493  input_path="$new_path"
31494  # Check if we need to convert this using DOS-style short mode. If the path
31495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31496  # take no chances and rewrite it.
31497  # Note: m4 eats our [], so we need to use [ and ] instead.
31498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31499  if test "x$has_forbidden_chars" != x; then
31500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31504      # Going to short mode and back again did indeed matter. Since short mode is
31505      # case insensitive, let's make it lowercase to improve readability.
31506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31507      # Now convert it back to Unix-style (cygpath)
31508      input_path=`$CYGPATH -u "$shortmode_path"`
31509      new_path="$input_path"
31510    fi
31511  fi
31512
31513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31514  if test "x$test_cygdrive_prefix" = x; then
31515    # As a simple fix, exclude /usr/bin since it's not a real path.
31516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31518      # a path prefixed by /cygdrive for fixpath to work.
31519      new_path="$CYGWIN_ROOT_PATH$input_path"
31520    fi
31521  fi
31522
31523
31524  if test "x$path" != "x$new_path"; then
31525    BUILD_JDK="$new_path"
31526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31527$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31528  fi
31529
31530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31531
31532  path="$BUILD_JDK"
31533  has_colon=`$ECHO $path | $GREP ^.:`
31534  new_path="$path"
31535  if test "x$has_colon" = x; then
31536    # Not in mixed or Windows style, start by that.
31537    new_path=`cmd //c echo $path`
31538  fi
31539
31540
31541  input_path="$new_path"
31542  # Check if we need to convert this using DOS-style short mode. If the path
31543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31544  # take no chances and rewrite it.
31545  # Note: m4 eats our [], so we need to use [ and ] instead.
31546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31547  if test "x$has_forbidden_chars" != x; then
31548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31550  fi
31551
31552
31553  windows_path="$new_path"
31554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31555    unix_path=`$CYGPATH -u "$windows_path"`
31556    new_path="$unix_path"
31557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31559    new_path="$unix_path"
31560  fi
31561
31562  if test "x$path" != "x$new_path"; then
31563    BUILD_JDK="$new_path"
31564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31565$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31566  fi
31567
31568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31570
31571    else
31572      # We're on a unix platform. Hooray! :)
31573      path="$BUILD_JDK"
31574      has_space=`$ECHO "$path" | $GREP " "`
31575      if test "x$has_space" != x; then
31576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31577$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31579      fi
31580
31581      # Use eval to expand a potential ~
31582      eval path="$path"
31583      if test ! -f "$path" && test ! -d "$path"; then
31584        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31585      fi
31586
31587      if test -d "$path"; then
31588        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31589      else
31590        dir="`$DIRNAME "$path"`"
31591        base="`$BASENAME "$path"`"
31592        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31593      fi
31594    fi
31595  fi
31596
31597          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31598$as_echo_n "checking for Build JDK... " >&6; }
31599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31600$as_echo "$BUILD_JDK" >&6; }
31601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31602$as_echo_n "checking Build JDK version... " >&6; }
31603          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31605$as_echo "$BUILD_JDK_VERSION" >&6; }
31606        fi # end check jdk version
31607      fi # end check java
31608    fi # end check build jdk found
31609  fi
31610
31611    EXTERNAL_BUILDJDK=true
31612  else
31613    if test "x$COMPILE_TYPE" = "xcross"; then
31614      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31615      BUILD_JDK_FOUND=yes
31616      CREATE_BUILDJDK=true
31617      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31618$as_echo_n "checking for Build JDK... " >&6; }
31619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31620$as_echo "yes, will build it for the host platform" >&6; }
31621    else
31622      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31623      BUILD_JDK_FOUND=yes
31624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31625$as_echo_n "checking for Build JDK... " >&6; }
31626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31627$as_echo "yes, will use output dir" >&6; }
31628    fi
31629  fi
31630
31631  JMOD="$BUILD_JDK/bin/jmod"
31632  JLINK="$BUILD_JDK/bin/jlink"
31633
31634
31635
31636  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31638$as_echo_n "checking for Build JDK... " >&6; }
31639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31640$as_echo "no" >&6; }
31641    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31642  fi
31643
31644
31645
31646
31647
31648
31649###############################################################################
31650#
31651# Configure the sources to use. We can add or override individual directories.
31652#
31653###############################################################################
31654
31655
31656  # Where are the sources.
31657  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31658  CORBA_TOPDIR="$SRC_ROOT/corba"
31659  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31660  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31661  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31662  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31663  JDK_TOPDIR="$SRC_ROOT/jdk"
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673  # This feature is no longer supported.
31674
31675
31676
31677# Check whether --with-add-source-root was given.
31678if test "${with_add_source_root+set}" = set; then :
31679  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
31680$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31681fi
31682
31683
31684
31685
31686# Check whether --with-override-source-root was given.
31687if test "${with_override_source_root+set}" = set; then :
31688  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
31689$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31690fi
31691
31692
31693
31694
31695# Check whether --with-adds-and-overrides was given.
31696if test "${with_adds_and_overrides+set}" = set; then :
31697  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
31698$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31699fi
31700
31701
31702
31703
31704# Check whether --with-override-langtools was given.
31705if test "${with_override_langtools+set}" = set; then :
31706  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31707$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31708fi
31709
31710
31711
31712
31713# Check whether --with-override-corba was given.
31714if test "${with_override_corba+set}" = set; then :
31715  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31716$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31717fi
31718
31719
31720
31721
31722# Check whether --with-override-jaxp was given.
31723if test "${with_override_jaxp+set}" = set; then :
31724  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31725$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31726fi
31727
31728
31729
31730
31731# Check whether --with-override-jaxws was given.
31732if test "${with_override_jaxws+set}" = set; then :
31733  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31734$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31735fi
31736
31737
31738
31739
31740# Check whether --with-override-hotspot was given.
31741if test "${with_override_hotspot+set}" = set; then :
31742  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31743$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31744fi
31745
31746
31747
31748
31749# Check whether --with-override-nashorn was given.
31750if test "${with_override_nashorn+set}" = set; then :
31751  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31752$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31753fi
31754
31755
31756
31757
31758# Check whether --with-override-jdk was given.
31759if test "${with_override_jdk+set}" = set; then :
31760  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31761$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31762fi
31763
31764
31765
31766
31767  BUILD_OUTPUT="$OUTPUT_ROOT"
31768
31769  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31770
31771
31772
31773# Check whether --with-import_hotspot was given.
31774if test "${with_import_hotspot+set}" = set; then :
31775  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31776$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31777fi
31778
31779
31780
31781
31782
31783
31784# Check whether --with-import-modules was given.
31785if test "${with_import_modules+set}" = set; then :
31786  withval=$with_import_modules;
31787fi
31788
31789
31790  if test "x$with_import_modules" != x \
31791      && test "x$with_import_modules" != "xno"; then
31792    if test -d "$with_import_modules"; then
31793      IMPORT_MODULES_TOPDIR="$with_import_modules"
31794
31795  # Only process if variable expands to non-empty
31796
31797  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31799
31800  # Input might be given as Windows format, start by converting to
31801  # unix format.
31802  path="$IMPORT_MODULES_TOPDIR"
31803  new_path=`$CYGPATH -u "$path"`
31804
31805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31808  # "foo.exe" is OK but "foo" is an error.
31809  #
31810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31811  # It is also a way to make sure we got the proper file name for the real test later on.
31812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31813  if test "x$test_shortpath" = x; then
31814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31815$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31816    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31817  fi
31818
31819  # Call helper function which possibly converts this using DOS-style short mode.
31820  # If so, the updated path is stored in $new_path.
31821
31822  input_path="$new_path"
31823  # Check if we need to convert this using DOS-style short mode. If the path
31824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31825  # take no chances and rewrite it.
31826  # Note: m4 eats our [], so we need to use [ and ] instead.
31827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31828  if test "x$has_forbidden_chars" != x; then
31829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31833      # Going to short mode and back again did indeed matter. Since short mode is
31834      # case insensitive, let's make it lowercase to improve readability.
31835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31836      # Now convert it back to Unix-style (cygpath)
31837      input_path=`$CYGPATH -u "$shortmode_path"`
31838      new_path="$input_path"
31839    fi
31840  fi
31841
31842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31843  if test "x$test_cygdrive_prefix" = x; then
31844    # As a simple fix, exclude /usr/bin since it's not a real path.
31845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31847      # a path prefixed by /cygdrive for fixpath to work.
31848      new_path="$CYGWIN_ROOT_PATH$input_path"
31849    fi
31850  fi
31851
31852
31853  if test "x$path" != "x$new_path"; then
31854    IMPORT_MODULES_TOPDIR="$new_path"
31855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31856$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31857  fi
31858
31859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31860
31861  path="$IMPORT_MODULES_TOPDIR"
31862  has_colon=`$ECHO $path | $GREP ^.:`
31863  new_path="$path"
31864  if test "x$has_colon" = x; then
31865    # Not in mixed or Windows style, start by that.
31866    new_path=`cmd //c echo $path`
31867  fi
31868
31869
31870  input_path="$new_path"
31871  # Check if we need to convert this using DOS-style short mode. If the path
31872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31873  # take no chances and rewrite it.
31874  # Note: m4 eats our [], so we need to use [ and ] instead.
31875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31876  if test "x$has_forbidden_chars" != x; then
31877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31879  fi
31880
31881
31882  windows_path="$new_path"
31883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31884    unix_path=`$CYGPATH -u "$windows_path"`
31885    new_path="$unix_path"
31886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31888    new_path="$unix_path"
31889  fi
31890
31891  if test "x$path" != "x$new_path"; then
31892    IMPORT_MODULES_TOPDIR="$new_path"
31893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31894$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31895  fi
31896
31897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31899
31900    else
31901      # We're on a unix platform. Hooray! :)
31902      path="$IMPORT_MODULES_TOPDIR"
31903      has_space=`$ECHO "$path" | $GREP " "`
31904      if test "x$has_space" != x; then
31905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31906$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31907        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31908      fi
31909
31910      # Use eval to expand a potential ~
31911      eval path="$path"
31912      if test ! -f "$path" && test ! -d "$path"; then
31913        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31914      fi
31915
31916      if test -d "$path"; then
31917        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31918      else
31919        dir="`$DIRNAME "$path"`"
31920        base="`$BASENAME "$path"`"
31921        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31922      fi
31923    fi
31924  fi
31925
31926    elif test -e "$with_import_modules"; then
31927      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31928      $RM -rf "$IMPORT_MODULES_TOPDIR"
31929      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31930      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31931        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31932      fi
31933    else
31934      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31935    fi
31936  fi
31937
31938  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31939    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31940  fi
31941  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31942    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31943  fi
31944  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31945    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31946  fi
31947  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31948    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31949  fi
31950  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31951    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31952  fi
31953  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31954    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31955  fi
31956  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31957    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31958  fi
31959  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31960    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31961  fi
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973###############################################################################
31974#
31975# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31976# native code.
31977#
31978###############################################################################
31979
31980# See if we are doing a complete static build or not
31981
31982  # Check whether --enable-static-build was given.
31983if test "${enable_static_build+set}" = set; then :
31984  enableval=$enable_static_build;
31985fi
31986
31987  STATIC_BUILD=false
31988  if test "x$enable_static_build" = "xyes"; then
31989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31990$as_echo_n "checking if static build is enabled... " >&6; }
31991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31992$as_echo "yes" >&6; }
31993    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31994      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31995    fi
31996    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31997    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31998    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31999    STATIC_BUILD=true
32000  elif test "x$enable_static_build" = "xno"; then
32001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32002$as_echo_n "checking if static build is enabled... " >&6; }
32003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32004$as_echo "no" >&6; }
32005  elif test "x$enable_static_build" != "x"; then
32006    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32007  fi
32008
32009
32010
32011
32012# First determine the toolchain type (compiler family)
32013
32014
32015# Check whether --with-toolchain-type was given.
32016if test "${with_toolchain_type+set}" = set; then :
32017  withval=$with_toolchain_type;
32018fi
32019
32020
32021  # Use indirect variable referencing
32022  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32023  VALID_TOOLCHAINS=${!toolchain_var_name}
32024
32025  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32026    if test -n "$XCODEBUILD"; then
32027      # On Mac OS X, default toolchain to clang after Xcode 5
32028      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32029      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32030      if test $? -ne 0; then
32031        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32032      fi
32033      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32034          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32035          $CUT -f 1 -d .`
32036      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32037$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32038      if test $XCODE_MAJOR_VERSION -ge 5; then
32039          DEFAULT_TOOLCHAIN="clang"
32040      else
32041          DEFAULT_TOOLCHAIN="gcc"
32042      fi
32043    else
32044      # If Xcode is not installed, but the command line tools are
32045      # then we can't run xcodebuild. On these systems we should
32046      # default to clang
32047      DEFAULT_TOOLCHAIN="clang"
32048    fi
32049  else
32050    # First toolchain type in the list is the default
32051    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32052  fi
32053
32054  if test "x$with_toolchain_type" = xlist; then
32055    # List all toolchains
32056    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32057$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32058    for toolchain in $VALID_TOOLCHAINS; do
32059      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32060      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32061      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32062    done
32063
32064    exit 0
32065  elif test "x$with_toolchain_type" != x; then
32066    # User override; check that it is valid
32067    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32068      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32069$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32070      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32071$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32072      as_fn_error $? "Cannot continue." "$LINENO" 5
32073    fi
32074    TOOLCHAIN_TYPE=$with_toolchain_type
32075  else
32076    # No flag given, use default
32077    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32078  fi
32079
32080
32081  TOOLCHAIN_CC_BINARY_clang="clang"
32082  TOOLCHAIN_CC_BINARY_gcc="gcc"
32083  TOOLCHAIN_CC_BINARY_microsoft="cl"
32084  TOOLCHAIN_CC_BINARY_solstudio="cc"
32085  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32086
32087  TOOLCHAIN_CXX_BINARY_clang="clang++"
32088  TOOLCHAIN_CXX_BINARY_gcc="g++"
32089  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32090  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32091  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32092
32093  # Use indirect variable referencing
32094  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32095  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32096  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32097  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32098  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32099  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32100  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32101  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32102
32103
32104  # Define filename patterns
32105  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32106    LIBRARY_PREFIX=
32107    SHARED_LIBRARY_SUFFIX='.dll'
32108    STATIC_LIBRARY_SUFFIX='.lib'
32109    SHARED_LIBRARY='$1.dll'
32110    STATIC_LIBRARY='$1.lib'
32111    OBJ_SUFFIX='.obj'
32112    EXE_SUFFIX='.exe'
32113  else
32114    LIBRARY_PREFIX=lib
32115    SHARED_LIBRARY_SUFFIX='.so'
32116    STATIC_LIBRARY_SUFFIX='.a'
32117    SHARED_LIBRARY='lib$1.so'
32118    STATIC_LIBRARY='lib$1.a'
32119    OBJ_SUFFIX='.o'
32120    EXE_SUFFIX=''
32121    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32122      # For full static builds, we're overloading the SHARED_LIBRARY
32123      # variables in order to limit the amount of changes required.
32124      # It would be better to remove SHARED and just use LIBRARY and
32125      # LIBRARY_SUFFIX for libraries that can be built either
32126      # shared or static and use STATIC_* for libraries that are
32127      # always built statically.
32128      if test "x$STATIC_BUILD" = xtrue; then
32129        SHARED_LIBRARY='lib$1.a'
32130        SHARED_LIBRARY_SUFFIX='.a'
32131      else
32132        SHARED_LIBRARY='lib$1.dylib'
32133        SHARED_LIBRARY_SUFFIX='.dylib'
32134      fi
32135    fi
32136  fi
32137
32138
32139
32140
32141
32142
32143
32144
32145
32146
32147  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32148    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32149$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32150  else
32151    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32152$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32153  fi
32154
32155
32156# User supplied flags should be used when configure detects compilers
32157
32158  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32159    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32160$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32161  fi
32162
32163  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32165$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32166  fi
32167
32168  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32169    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32170$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32171  fi
32172
32173
32174# Check whether --with-extra-cflags was given.
32175if test "${with_extra_cflags+set}" = set; then :
32176  withval=$with_extra_cflags;
32177fi
32178
32179
32180
32181# Check whether --with-extra-cxxflags was given.
32182if test "${with_extra_cxxflags+set}" = set; then :
32183  withval=$with_extra_cxxflags;
32184fi
32185
32186
32187
32188# Check whether --with-extra-ldflags was given.
32189if test "${with_extra_ldflags+set}" = set; then :
32190  withval=$with_extra_ldflags;
32191fi
32192
32193
32194  EXTRA_CFLAGS="$with_extra_cflags"
32195  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32196  EXTRA_LDFLAGS="$with_extra_ldflags"
32197
32198
32199
32200
32201
32202  # The global CFLAGS and LDLAGS variables are used by configure tests and
32203  # should include the extra parameters
32204  CFLAGS="$EXTRA_CFLAGS"
32205  CXXFLAGS="$EXTRA_CXXFLAGS"
32206  LDFLAGS="$EXTRA_LDFLAGS"
32207  CPPFLAGS=""
32208
32209# The sysroot cflags are needed for configure to be able to run the compilers
32210
32211  if test "x$SYSROOT" != "x"; then
32212    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32213      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32214        # Solaris Studio does not have a concept of sysroot. Instead we must
32215        # make sure the default include and lib dirs are appended to each
32216        # compile and link command line. Must also add -I-xbuiltin to enable
32217        # inlining of system functions and intrinsics.
32218        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32219        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32220            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32221      fi
32222    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32223      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32224      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32225    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32226      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32227      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32228    fi
32229    # The global CFLAGS and LDFLAGS variables need these for configure to function
32230    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32231    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32232    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32233    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32234  fi
32235
32236  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32237    # We also need -iframework<path>/System/Library/Frameworks
32238    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32239    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32240    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32241    # set this here so it doesn't have to be peppered throughout the forest
32242    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32243    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32244  fi
32245
32246
32247
32248
32249
32250# Then detect the actual binaries needed
32251
32252  # FIXME: Is this needed?
32253  ac_ext=cpp
32254ac_cpp='$CXXCPP $CPPFLAGS'
32255ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32256ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32257ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32258
32259
32260  # Store the CFLAGS etc passed to the configure script.
32261  ORG_CFLAGS="$CFLAGS"
32262  ORG_CXXFLAGS="$CXXFLAGS"
32263
32264  # autoconf magic only relies on PATH, so update it if tools dir is specified
32265  OLD_PATH="$PATH"
32266
32267  # On Windows, we need to detect the visual studio installation first.
32268  # This will change the PATH, but we need to keep that new PATH even
32269  # after toolchain detection is done, since the compiler (on x86) uses
32270  # it for DLL resolution in runtime.
32271  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32272      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32273
32274  # Store path to cygwin link.exe to help excluding it when searching for
32275  # VS linker. This must be done before changing the PATH when looking for VS.
32276  # Extract the first word of "link", so it can be a program name with args.
32277set dummy link; ac_word=$2
32278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32279$as_echo_n "checking for $ac_word... " >&6; }
32280if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32281  $as_echo_n "(cached) " >&6
32282else
32283  case $CYGWIN_LINK in
32284  [\\/]* | ?:[\\/]*)
32285  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32286  ;;
32287  *)
32288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32289for as_dir in $PATH
32290do
32291  IFS=$as_save_IFS
32292  test -z "$as_dir" && as_dir=.
32293    for ac_exec_ext in '' $ac_executable_extensions; do
32294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32295    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32297    break 2
32298  fi
32299done
32300  done
32301IFS=$as_save_IFS
32302
32303  ;;
32304esac
32305fi
32306CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32307if test -n "$CYGWIN_LINK"; then
32308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32309$as_echo "$CYGWIN_LINK" >&6; }
32310else
32311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32312$as_echo "no" >&6; }
32313fi
32314
32315
32316  if test "x$CYGWIN_LINK" != x; then
32317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32318$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32319    "$CYGWIN_LINK" --version > /dev/null
32320    if test $? -eq 0 ; then
32321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32322$as_echo "yes" >&6; }
32323    else
32324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32325$as_echo "no" >&6; }
32326      # This might be the VS linker. Don't exclude it later on.
32327      CYGWIN_LINK=""
32328    fi
32329  fi
32330
32331  # First-hand choice is to locate and run the vsvars bat file.
32332
32333
32334# Check whether --with-toolchain-version was given.
32335if test "${with_toolchain_version+set}" = set; then :
32336  withval=$with_toolchain_version;
32337fi
32338
32339
32340  if test "x$with_toolchain_version" = xlist; then
32341    # List all toolchains
32342    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32343$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32344    for version in $VALID_VS_VERSIONS; do
32345      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32346      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32347    done
32348
32349    exit 0
32350  elif test "x$DEVKIT_VS_VERSION" != x; then
32351    VS_VERSION=$DEVKIT_VS_VERSION
32352    TOOLCHAIN_VERSION=$VS_VERSION
32353    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32354    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32355    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32356    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32357    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32358    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32359
32360    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32361    # can still be exported as INCLUDE for compiler invocations without
32362    # SYSROOT_CFLAGS
32363    OLDIFS="$IFS"
32364    IFS=";"
32365    for i in $DEVKIT_VS_INCLUDE; do
32366      ipath=$i
32367
32368  unix_path="$ipath"
32369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32370    windows_path=`$CYGPATH -m "$unix_path"`
32371    ipath="$windows_path"
32372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32373    windows_path=`cmd //c echo $unix_path`
32374    ipath="$windows_path"
32375  fi
32376
32377      VS_INCLUDE="$VS_INCLUDE;$ipath"
32378    done
32379    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32380    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32381    for i in $DEVKIT_VS_LIB; do
32382      libpath=$i
32383
32384  unix_path="$libpath"
32385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32386    windows_path=`$CYGPATH -m "$unix_path"`
32387    libpath="$windows_path"
32388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32389    windows_path=`cmd //c echo $unix_path`
32390    libpath="$windows_path"
32391  fi
32392
32393      VS_LIB="$VS_LIB;$libpath"
32394    done
32395    IFS="$OLDIFS"
32396
32397    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32398$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32399
32400  elif test "x$with_toolchain_version" != x; then
32401    # User override; check that it is valid
32402    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32403      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32404$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32405      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32406$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32407      as_fn_error $? "Cannot continue." "$LINENO" 5
32408    fi
32409    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32410  else
32411    # No flag given, use default
32412    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32413  fi
32414
32415  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32416
32417  VS_VERSION="$VS_VERSION"
32418  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32419  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32420  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32421  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32422
32423  # When using --with-tools-dir, assume it points to the correct and default
32424  # version of Visual Studio or that --with-toolchain-version was also set.
32425  if test "x$with_tools_dir" != x; then
32426
32427  if test "x$VS_ENV_CMD" = x; then
32428    VS_VERSION="${VS_VERSION}"
32429    VS_BASE="$with_tools_dir/../.."
32430    METHOD="--with-tools-dir"
32431
32432    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32433      VCVARSFILE="vc/bin/vcvars32.bat"
32434    else
32435      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32436    fi
32437
32438
32439  windows_path="$VS_BASE"
32440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32441    unix_path=`$CYGPATH -u "$windows_path"`
32442    VS_BASE="$unix_path"
32443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32445    VS_BASE="$unix_path"
32446  fi
32447
32448    if test -d "$VS_BASE"; then
32449      if test -f "$VS_BASE/$VCVARSFILE"; then
32450        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32451$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32452        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32453        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32454        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32455        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32456      else
32457        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32458$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32459        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32460$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32461      fi
32462    fi
32463  fi
32464
32465
32466  if test "x$VS_ENV_CMD" = x; then
32467    VS_VERSION="${VS_VERSION}"
32468    VS_BASE="$with_tools_dir/../../.."
32469    METHOD="--with-tools-dir"
32470
32471    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32472      VCVARSFILE="vc/bin/vcvars32.bat"
32473    else
32474      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32475    fi
32476
32477
32478  windows_path="$VS_BASE"
32479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32480    unix_path=`$CYGPATH -u "$windows_path"`
32481    VS_BASE="$unix_path"
32482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32484    VS_BASE="$unix_path"
32485  fi
32486
32487    if test -d "$VS_BASE"; then
32488      if test -f "$VS_BASE/$VCVARSFILE"; then
32489        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32490$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32491        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32492        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32493        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32494        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32495      else
32496        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32497$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32498        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32499$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32500      fi
32501    fi
32502  fi
32503
32504    if test "x$VS_ENV_CMD" = x; then
32505      # Having specified an argument which is incorrect will produce an instant failure;
32506      # we should not go on looking
32507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32508$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32509      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32510$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32511      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32512$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32513      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32514    fi
32515  fi
32516
32517  VS_ENV_CMD=""
32518  VS_ENV_ARGS=""
32519
32520  if test "x$VS_COMNTOOLS" != x; then
32521
32522  if test "x$VS_ENV_CMD" = x; then
32523    VS_VERSION="${VS_VERSION}"
32524    VS_BASE="$VS_COMNTOOLS/../.."
32525    METHOD="$VS_COMNTOOLS_VAR variable"
32526
32527    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32528      VCVARSFILE="vc/bin/vcvars32.bat"
32529    else
32530      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32531    fi
32532
32533
32534  windows_path="$VS_BASE"
32535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536    unix_path=`$CYGPATH -u "$windows_path"`
32537    VS_BASE="$unix_path"
32538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32540    VS_BASE="$unix_path"
32541  fi
32542
32543    if test -d "$VS_BASE"; then
32544      if test -f "$VS_BASE/$VCVARSFILE"; then
32545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32546$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32547        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32548        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32549        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32550        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32551      else
32552        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32553$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32554        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32555$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32556      fi
32557    fi
32558  fi
32559
32560  fi
32561  if test "x$PROGRAMFILES" != x; then
32562
32563  if test "x$VS_ENV_CMD" = x; then
32564    VS_VERSION="${VS_VERSION}"
32565    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32566    METHOD="well-known name"
32567
32568    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32569      VCVARSFILE="vc/bin/vcvars32.bat"
32570    else
32571      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32572    fi
32573
32574
32575  windows_path="$VS_BASE"
32576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32577    unix_path=`$CYGPATH -u "$windows_path"`
32578    VS_BASE="$unix_path"
32579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32581    VS_BASE="$unix_path"
32582  fi
32583
32584    if test -d "$VS_BASE"; then
32585      if test -f "$VS_BASE/$VCVARSFILE"; then
32586        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32587$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32588        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32589        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32590        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32591        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32592      else
32593        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32594$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32595        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32596$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32597      fi
32598    fi
32599  fi
32600
32601  fi
32602  # Work around the insanely named ProgramFiles(x86) env variable
32603  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32604  if test "x$PROGRAMFILES_X86" != x; then
32605
32606  if test "x$VS_ENV_CMD" = x; then
32607    VS_VERSION="${VS_VERSION}"
32608    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32609    METHOD="well-known name"
32610
32611    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32612      VCVARSFILE="vc/bin/vcvars32.bat"
32613    else
32614      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32615    fi
32616
32617
32618  windows_path="$VS_BASE"
32619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32620    unix_path=`$CYGPATH -u "$windows_path"`
32621    VS_BASE="$unix_path"
32622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32624    VS_BASE="$unix_path"
32625  fi
32626
32627    if test -d "$VS_BASE"; then
32628      if test -f "$VS_BASE/$VCVARSFILE"; then
32629        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32630$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32631        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32632        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32633        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32634        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32635      else
32636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32637$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32638        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32639$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32640      fi
32641    fi
32642  fi
32643
32644  fi
32645
32646  if test "x$VS_ENV_CMD" = x; then
32647    VS_VERSION="${VS_VERSION}"
32648    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32649    METHOD="well-known name"
32650
32651    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32652      VCVARSFILE="vc/bin/vcvars32.bat"
32653    else
32654      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32655    fi
32656
32657
32658  windows_path="$VS_BASE"
32659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32660    unix_path=`$CYGPATH -u "$windows_path"`
32661    VS_BASE="$unix_path"
32662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32664    VS_BASE="$unix_path"
32665  fi
32666
32667    if test -d "$VS_BASE"; then
32668      if test -f "$VS_BASE/$VCVARSFILE"; then
32669        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32670$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32671        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32672        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32673        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32674        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32675      else
32676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32677$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32678        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32679$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32680      fi
32681    fi
32682  fi
32683
32684
32685  if test "x$VS_ENV_CMD" = x; then
32686    VS_VERSION="${VS_VERSION}"
32687    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32688    METHOD="well-known name"
32689
32690    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32691      VCVARSFILE="vc/bin/vcvars32.bat"
32692    else
32693      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32694    fi
32695
32696
32697  windows_path="$VS_BASE"
32698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32699    unix_path=`$CYGPATH -u "$windows_path"`
32700    VS_BASE="$unix_path"
32701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32703    VS_BASE="$unix_path"
32704  fi
32705
32706    if test -d "$VS_BASE"; then
32707      if test -f "$VS_BASE/$VCVARSFILE"; then
32708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32709$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32710        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32711        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32712        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32713        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32714      else
32715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32716$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32717        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32718$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32719      fi
32720    fi
32721  fi
32722
32723
32724  if test "x$SDK_INSTALL_DIR" != x; then
32725    if test "x$ProgramW6432" != x; then
32726
32727  if test "x$VS_ENV_CMD" = x; then
32728    VS_VERSION="${VS_VERSION}"
32729    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32730    METHOD="well-known name"
32731
32732  windows_path="$WIN_SDK_BASE"
32733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32734    unix_path=`$CYGPATH -u "$windows_path"`
32735    WIN_SDK_BASE="$unix_path"
32736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32738    WIN_SDK_BASE="$unix_path"
32739  fi
32740
32741    if test -d "$WIN_SDK_BASE"; then
32742      # There have been cases of partial or broken SDK installations. A missing
32743      # lib dir is not going to work.
32744      if test ! -d "$WIN_SDK_BASE/lib"; then
32745        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32746$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32747        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32748$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32749      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32751$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32752        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32753        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32754          VS_ENV_ARGS="/x86"
32755        else
32756          VS_ENV_ARGS="/x64"
32757        fi
32758        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32759        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32760        # TODO: improve detection for other versions of SDK
32761        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32762      else
32763        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32764$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32765        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32766$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32767      fi
32768    fi
32769  fi
32770
32771    fi
32772    if test "x$PROGRAMW6432" != x; then
32773
32774  if test "x$VS_ENV_CMD" = x; then
32775    VS_VERSION="${VS_VERSION}"
32776    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32777    METHOD="well-known name"
32778
32779  windows_path="$WIN_SDK_BASE"
32780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32781    unix_path=`$CYGPATH -u "$windows_path"`
32782    WIN_SDK_BASE="$unix_path"
32783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32785    WIN_SDK_BASE="$unix_path"
32786  fi
32787
32788    if test -d "$WIN_SDK_BASE"; then
32789      # There have been cases of partial or broken SDK installations. A missing
32790      # lib dir is not going to work.
32791      if test ! -d "$WIN_SDK_BASE/lib"; then
32792        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32793$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32794        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32795$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32796      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32798$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32799        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32800        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32801          VS_ENV_ARGS="/x86"
32802        else
32803          VS_ENV_ARGS="/x64"
32804        fi
32805        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32806        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32807        # TODO: improve detection for other versions of SDK
32808        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32809      else
32810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32811$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32813$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32814      fi
32815    fi
32816  fi
32817
32818    fi
32819    if test "x$PROGRAMFILES" != x; then
32820
32821  if test "x$VS_ENV_CMD" = x; then
32822    VS_VERSION="${VS_VERSION}"
32823    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32824    METHOD="well-known name"
32825
32826  windows_path="$WIN_SDK_BASE"
32827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32828    unix_path=`$CYGPATH -u "$windows_path"`
32829    WIN_SDK_BASE="$unix_path"
32830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32832    WIN_SDK_BASE="$unix_path"
32833  fi
32834
32835    if test -d "$WIN_SDK_BASE"; then
32836      # There have been cases of partial or broken SDK installations. A missing
32837      # lib dir is not going to work.
32838      if test ! -d "$WIN_SDK_BASE/lib"; then
32839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32840$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32841        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32842$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32843      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32845$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32846        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32847        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32848          VS_ENV_ARGS="/x86"
32849        else
32850          VS_ENV_ARGS="/x64"
32851        fi
32852        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32853        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32854        # TODO: improve detection for other versions of SDK
32855        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32856      else
32857        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32858$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32859        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32860$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32861      fi
32862    fi
32863  fi
32864
32865    fi
32866
32867  if test "x$VS_ENV_CMD" = x; then
32868    VS_VERSION="${VS_VERSION}"
32869    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32870    METHOD="well-known name"
32871
32872  windows_path="$WIN_SDK_BASE"
32873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32874    unix_path=`$CYGPATH -u "$windows_path"`
32875    WIN_SDK_BASE="$unix_path"
32876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32878    WIN_SDK_BASE="$unix_path"
32879  fi
32880
32881    if test -d "$WIN_SDK_BASE"; then
32882      # There have been cases of partial or broken SDK installations. A missing
32883      # lib dir is not going to work.
32884      if test ! -d "$WIN_SDK_BASE/lib"; then
32885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32886$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32888$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32889      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32891$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32892        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32893        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32894          VS_ENV_ARGS="/x86"
32895        else
32896          VS_ENV_ARGS="/x64"
32897        fi
32898        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32899        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32900        # TODO: improve detection for other versions of SDK
32901        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32902      else
32903        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32904$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32905        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32906$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32907      fi
32908    fi
32909  fi
32910
32911
32912  if test "x$VS_ENV_CMD" = x; then
32913    VS_VERSION="${VS_VERSION}"
32914    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32915    METHOD="well-known name"
32916
32917  windows_path="$WIN_SDK_BASE"
32918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32919    unix_path=`$CYGPATH -u "$windows_path"`
32920    WIN_SDK_BASE="$unix_path"
32921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32923    WIN_SDK_BASE="$unix_path"
32924  fi
32925
32926    if test -d "$WIN_SDK_BASE"; then
32927      # There have been cases of partial or broken SDK installations. A missing
32928      # lib dir is not going to work.
32929      if test ! -d "$WIN_SDK_BASE/lib"; then
32930        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32931$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32932        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32933$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32934      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32936$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32937        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32938        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32939          VS_ENV_ARGS="/x86"
32940        else
32941          VS_ENV_ARGS="/x64"
32942        fi
32943        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32944        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32945        # TODO: improve detection for other versions of SDK
32946        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32947      else
32948        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32949$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32950        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32951$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32952      fi
32953    fi
32954  fi
32955
32956  fi
32957
32958    if test "x$VS_ENV_CMD" != x; then
32959      TOOLCHAIN_VERSION=$VS_VERSION
32960      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32961      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32962      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32963      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32964      # The rest of the variables are already evaled while probing
32965      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32966$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32967      break
32968    fi
32969  done
32970
32971
32972  # If we have a devkit, skip all of the below.
32973  if test "x$DEVKIT_VS_VERSION" = x; then
32974    if test "x$VS_ENV_CMD" != x; then
32975      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32976
32977  # Only process if variable expands to non-empty
32978
32979  if test "x$VS_ENV_CMD" != x; then
32980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32981
32982  # First separate the path from the arguments. This will split at the first
32983  # space.
32984  complete="$VS_ENV_CMD"
32985  path="${complete%% *}"
32986  tmp="$complete EOL"
32987  arguments="${tmp#* }"
32988
32989  # Input might be given as Windows format, start by converting to
32990  # unix format.
32991  new_path=`$CYGPATH -u "$path"`
32992
32993  # Now try to locate executable using which
32994  new_path=`$WHICH "$new_path" 2> /dev/null`
32995  # bat and cmd files are not always considered executable in cygwin causing which
32996  # to not find them
32997  if test "x$new_path" = x \
32998      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32999      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33000    new_path=`$CYGPATH -u "$path"`
33001  fi
33002  if test "x$new_path" = x; then
33003    # Oops. Which didn't find the executable.
33004    # The splitting of arguments from the executable at a space might have been incorrect,
33005    # since paths with space are more likely in Windows. Give it another try with the whole
33006    # argument.
33007    path="$complete"
33008    arguments="EOL"
33009    new_path=`$CYGPATH -u "$path"`
33010    new_path=`$WHICH "$new_path" 2> /dev/null`
33011    # bat and cmd files are not always considered executable in cygwin causing which
33012    # to not find them
33013    if test "x$new_path" = x \
33014        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33015        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33016      new_path=`$CYGPATH -u "$path"`
33017    fi
33018    if test "x$new_path" = x; then
33019      # It's still not found. Now this is an unrecoverable error.
33020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33021$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33022      has_space=`$ECHO "$complete" | $GREP " "`
33023      if test "x$has_space" != x; then
33024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33026      fi
33027      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33028    fi
33029  fi
33030
33031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33034  # "foo.exe" is OK but "foo" is an error.
33035  #
33036  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33037  # It is also a way to make sure we got the proper file name for the real test later on.
33038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33039  if test "x$test_shortpath" = x; then
33040    # Short path failed, file does not exist as specified.
33041    # Try adding .exe or .cmd
33042    if test -f "${new_path}.exe"; then
33043      input_to_shortpath="${new_path}.exe"
33044    elif test -f "${new_path}.cmd"; then
33045      input_to_shortpath="${new_path}.cmd"
33046    else
33047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33048$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33049      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33050$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33051      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33052    fi
33053  else
33054    input_to_shortpath="$new_path"
33055  fi
33056
33057  # Call helper function which possibly converts this using DOS-style short mode.
33058  # If so, the updated path is stored in $new_path.
33059  new_path="$input_to_shortpath"
33060
33061  input_path="$input_to_shortpath"
33062  # Check if we need to convert this using DOS-style short mode. If the path
33063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33064  # take no chances and rewrite it.
33065  # Note: m4 eats our [], so we need to use [ and ] instead.
33066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33067  if test "x$has_forbidden_chars" != x; then
33068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33072      # Going to short mode and back again did indeed matter. Since short mode is
33073      # case insensitive, let's make it lowercase to improve readability.
33074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33075      # Now convert it back to Unix-style (cygpath)
33076      input_path=`$CYGPATH -u "$shortmode_path"`
33077      new_path="$input_path"
33078    fi
33079  fi
33080
33081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33082  if test "x$test_cygdrive_prefix" = x; then
33083    # As a simple fix, exclude /usr/bin since it's not a real path.
33084    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33086      # a path prefixed by /cygdrive for fixpath to work.
33087      new_path="$CYGWIN_ROOT_PATH$input_path"
33088    fi
33089  fi
33090
33091  # remove trailing .exe if any
33092  new_path="${new_path/%.exe/}"
33093
33094    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33095
33096  # First separate the path from the arguments. This will split at the first
33097  # space.
33098  complete="$VS_ENV_CMD"
33099  path="${complete%% *}"
33100  tmp="$complete EOL"
33101  arguments="${tmp#* }"
33102
33103  # Input might be given as Windows format, start by converting to
33104  # unix format.
33105  new_path="$path"
33106
33107  windows_path="$new_path"
33108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33109    unix_path=`$CYGPATH -u "$windows_path"`
33110    new_path="$unix_path"
33111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33113    new_path="$unix_path"
33114  fi
33115
33116
33117  # Now try to locate executable using which
33118  new_path=`$WHICH "$new_path" 2> /dev/null`
33119
33120  if test "x$new_path" = x; then
33121    # Oops. Which didn't find the executable.
33122    # The splitting of arguments from the executable at a space might have been incorrect,
33123    # since paths with space are more likely in Windows. Give it another try with the whole
33124    # argument.
33125    path="$complete"
33126    arguments="EOL"
33127    new_path="$path"
33128
33129  windows_path="$new_path"
33130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33131    unix_path=`$CYGPATH -u "$windows_path"`
33132    new_path="$unix_path"
33133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33135    new_path="$unix_path"
33136  fi
33137
33138
33139    new_path=`$WHICH "$new_path" 2> /dev/null`
33140    # bat and cmd files are not always considered executable in MSYS causing which
33141    # to not find them
33142    if test "x$new_path" = x \
33143        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33144        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33145      new_path="$path"
33146
33147  windows_path="$new_path"
33148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33149    unix_path=`$CYGPATH -u "$windows_path"`
33150    new_path="$unix_path"
33151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33153    new_path="$unix_path"
33154  fi
33155
33156    fi
33157
33158    if test "x$new_path" = x; then
33159      # It's still not found. Now this is an unrecoverable error.
33160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33161$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33162      has_space=`$ECHO "$complete" | $GREP " "`
33163      if test "x$has_space" != x; then
33164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33166      fi
33167      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33168    fi
33169  fi
33170
33171  # Now new_path has a complete unix path to the binary
33172  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33173    # Keep paths in /bin as-is, but remove trailing .exe if any
33174    new_path="${new_path/%.exe/}"
33175    # Do not save /bin paths to all_fixpath_prefixes!
33176  else
33177    # Not in mixed or Windows style, start by that.
33178    new_path=`cmd //c echo $new_path`
33179
33180  input_path="$new_path"
33181  # Check if we need to convert this using DOS-style short mode. If the path
33182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33183  # take no chances and rewrite it.
33184  # Note: m4 eats our [], so we need to use [ and ] instead.
33185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33186  if test "x$has_forbidden_chars" != x; then
33187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33189  fi
33190
33191    # Output is in $new_path
33192
33193  windows_path="$new_path"
33194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33195    unix_path=`$CYGPATH -u "$windows_path"`
33196    new_path="$unix_path"
33197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33199    new_path="$unix_path"
33200  fi
33201
33202    # remove trailing .exe if any
33203    new_path="${new_path/%.exe/}"
33204
33205    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33206    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33207  fi
33208
33209    else
33210      # We're on a unix platform. Hooray! :)
33211      # First separate the path from the arguments. This will split at the first
33212      # space.
33213      complete="$VS_ENV_CMD"
33214      path="${complete%% *}"
33215      tmp="$complete EOL"
33216      arguments="${tmp#* }"
33217
33218      # Cannot rely on the command "which" here since it doesn't always work.
33219      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33220      if test -z "$is_absolute_path"; then
33221        # Path to executable is not absolute. Find it.
33222        IFS_save="$IFS"
33223        IFS=:
33224        for p in $PATH; do
33225          if test -f "$p/$path" && test -x "$p/$path"; then
33226            new_path="$p/$path"
33227            break
33228          fi
33229        done
33230        IFS="$IFS_save"
33231      else
33232        # This is an absolute path, we can use it without further modifications.
33233        new_path="$path"
33234      fi
33235
33236      if test "x$new_path" = x; then
33237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33238$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33239        has_space=`$ECHO "$complete" | $GREP " "`
33240        if test "x$has_space" != x; then
33241          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33242$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33243        fi
33244        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33245      fi
33246    fi
33247
33248    # Now join together the path and the arguments once again
33249    if test "x$arguments" != xEOL; then
33250      new_complete="$new_path ${arguments% *}"
33251    else
33252      new_complete="$new_path"
33253    fi
33254
33255    if test "x$complete" != "x$new_complete"; then
33256      VS_ENV_CMD="$new_complete"
33257      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33258$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33259    fi
33260  fi
33261
33262
33263      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33264      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33265$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33266
33267      # We need to create a couple of temporary files.
33268      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33269      $MKDIR -p $VS_ENV_TMP_DIR
33270
33271      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33272      # Instead create a shell script which will set the relevant variables when run.
33273      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33274
33275  unix_path="$WINPATH_VS_ENV_CMD"
33276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33277    windows_path=`$CYGPATH -m "$unix_path"`
33278    WINPATH_VS_ENV_CMD="$windows_path"
33279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33280    windows_path=`cmd //c echo $unix_path`
33281    WINPATH_VS_ENV_CMD="$windows_path"
33282  fi
33283
33284      WINPATH_BASH="$BASH"
33285
33286  unix_path="$WINPATH_BASH"
33287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33288    windows_path=`$CYGPATH -m "$unix_path"`
33289    WINPATH_BASH="$windows_path"
33290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33291    windows_path=`cmd //c echo $unix_path`
33292    WINPATH_BASH="$windows_path"
33293  fi
33294
33295
33296      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33297      # script (executable by bash) that will setup the important variables.
33298      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33299      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33300      # This will end up something like:
33301      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33302      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33303      # These will end up something like:
33304      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33305      # The trailing space for everyone except PATH is no typo, but is needed due
33306      # to trailing \ in the Windows paths. These will be stripped later.
33307      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33308          >> $EXTRACT_VC_ENV_BAT_FILE
33309      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33310          >> $EXTRACT_VC_ENV_BAT_FILE
33311      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33312          >> $EXTRACT_VC_ENV_BAT_FILE
33313      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33314          >> $EXTRACT_VC_ENV_BAT_FILE
33315      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33316          >> $EXTRACT_VC_ENV_BAT_FILE
33317      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33318          >> $EXTRACT_VC_ENV_BAT_FILE
33319
33320      # Now execute the newly created bat file.
33321      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33322      # Change directory so we don't need to mess with Windows paths in redirects.
33323      cd $VS_ENV_TMP_DIR
33324      cmd /c extract-vs-env.bat | $CAT
33325      cd $CURDIR
33326
33327      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33328        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33329$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33330        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33331$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33332        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33333$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33334        as_fn_error $? "Cannot continue" "$LINENO" 5
33335      fi
33336
33337      # Now set all paths and other env variables. This will allow the rest of
33338      # the configure script to find and run the compiler in the proper way.
33339      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33340$as_echo "$as_me: Setting extracted environment variables" >&6;}
33341      . $VS_ENV_TMP_DIR/set-vs-env.sh
33342      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33343      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33344    else
33345      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33346      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33347$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33348    fi
33349  fi
33350
33351  # At this point, we should have correct variables in the environment, or we can't continue.
33352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33353$as_echo_n "checking for Visual Studio variables... " >&6; }
33354
33355  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33356      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33357    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33359$as_echo "present but broken" >&6; }
33360      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33361    else
33362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33363$as_echo "ok" >&6; }
33364      # Remove any trailing "\" ";" and " " from the variables.
33365      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33366      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33367      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33368      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33369      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33370      # Remove any paths containing # (typically F#) as that messes up make. This
33371      # is needed if visual studio was installed with F# support.
33372      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33373
33374
33375
33376
33377
33378      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33379      OLDIFS="$IFS"
33380      IFS=";"
33381      for i in $VS_INCLUDE; do
33382        ipath=$i
33383        # Only process non-empty elements
33384        if test "x$ipath" != x; then
33385          IFS="$OLDIFS"
33386          # Check that directory exists before calling fixup_path
33387          testpath=$ipath
33388
33389  windows_path="$testpath"
33390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33391    unix_path=`$CYGPATH -u "$windows_path"`
33392    testpath="$unix_path"
33393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33395    testpath="$unix_path"
33396  fi
33397
33398          if test -d "$testpath"; then
33399
33400  # Only process if variable expands to non-empty
33401
33402  if test "x$ipath" != x; then
33403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33404
33405  # Input might be given as Windows format, start by converting to
33406  # unix format.
33407  path="$ipath"
33408  new_path=`$CYGPATH -u "$path"`
33409
33410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33413  # "foo.exe" is OK but "foo" is an error.
33414  #
33415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33416  # It is also a way to make sure we got the proper file name for the real test later on.
33417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33418  if test "x$test_shortpath" = x; then
33419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33420$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33421    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33422  fi
33423
33424  # Call helper function which possibly converts this using DOS-style short mode.
33425  # If so, the updated path is stored in $new_path.
33426
33427  input_path="$new_path"
33428  # Check if we need to convert this using DOS-style short mode. If the path
33429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33430  # take no chances and rewrite it.
33431  # Note: m4 eats our [], so we need to use [ and ] instead.
33432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33433  if test "x$has_forbidden_chars" != x; then
33434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33438      # Going to short mode and back again did indeed matter. Since short mode is
33439      # case insensitive, let's make it lowercase to improve readability.
33440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33441      # Now convert it back to Unix-style (cygpath)
33442      input_path=`$CYGPATH -u "$shortmode_path"`
33443      new_path="$input_path"
33444    fi
33445  fi
33446
33447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33448  if test "x$test_cygdrive_prefix" = x; then
33449    # As a simple fix, exclude /usr/bin since it's not a real path.
33450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33452      # a path prefixed by /cygdrive for fixpath to work.
33453      new_path="$CYGWIN_ROOT_PATH$input_path"
33454    fi
33455  fi
33456
33457
33458  if test "x$path" != "x$new_path"; then
33459    ipath="$new_path"
33460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33461$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33462  fi
33463
33464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33465
33466  path="$ipath"
33467  has_colon=`$ECHO $path | $GREP ^.:`
33468  new_path="$path"
33469  if test "x$has_colon" = x; then
33470    # Not in mixed or Windows style, start by that.
33471    new_path=`cmd //c echo $path`
33472  fi
33473
33474
33475  input_path="$new_path"
33476  # Check if we need to convert this using DOS-style short mode. If the path
33477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33478  # take no chances and rewrite it.
33479  # Note: m4 eats our [], so we need to use [ and ] instead.
33480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33481  if test "x$has_forbidden_chars" != x; then
33482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33484  fi
33485
33486
33487  windows_path="$new_path"
33488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33489    unix_path=`$CYGPATH -u "$windows_path"`
33490    new_path="$unix_path"
33491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33493    new_path="$unix_path"
33494  fi
33495
33496  if test "x$path" != "x$new_path"; then
33497    ipath="$new_path"
33498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33499$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33500  fi
33501
33502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33504
33505    else
33506      # We're on a unix platform. Hooray! :)
33507      path="$ipath"
33508      has_space=`$ECHO "$path" | $GREP " "`
33509      if test "x$has_space" != x; then
33510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33511$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33513      fi
33514
33515      # Use eval to expand a potential ~
33516      eval path="$path"
33517      if test ! -f "$path" && test ! -d "$path"; then
33518        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33519      fi
33520
33521      if test -d "$path"; then
33522        ipath="`cd "$path"; $THEPWDCMD -L`"
33523      else
33524        dir="`$DIRNAME "$path"`"
33525        base="`$BASENAME "$path"`"
33526        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33527      fi
33528    fi
33529  fi
33530
33531            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33532          fi
33533          IFS=";"
33534        fi
33535      done
33536      # Convert VS_LIB into SYSROOT_LDFLAGS
33537      for i in $VS_LIB; do
33538        libpath=$i
33539        # Only process non-empty elements
33540        if test "x$libpath" != x; then
33541          IFS="$OLDIFS"
33542          # Check that directory exists before calling fixup_path
33543          testpath=$libpath
33544
33545  windows_path="$testpath"
33546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33547    unix_path=`$CYGPATH -u "$windows_path"`
33548    testpath="$unix_path"
33549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33551    testpath="$unix_path"
33552  fi
33553
33554          if test -d "$testpath"; then
33555
33556  # Only process if variable expands to non-empty
33557
33558  if test "x$libpath" != x; then
33559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33560
33561  # Input might be given as Windows format, start by converting to
33562  # unix format.
33563  path="$libpath"
33564  new_path=`$CYGPATH -u "$path"`
33565
33566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33569  # "foo.exe" is OK but "foo" is an error.
33570  #
33571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33572  # It is also a way to make sure we got the proper file name for the real test later on.
33573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33574  if test "x$test_shortpath" = x; then
33575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33576$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33577    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33578  fi
33579
33580  # Call helper function which possibly converts this using DOS-style short mode.
33581  # If so, the updated path is stored in $new_path.
33582
33583  input_path="$new_path"
33584  # Check if we need to convert this using DOS-style short mode. If the path
33585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33586  # take no chances and rewrite it.
33587  # Note: m4 eats our [], so we need to use [ and ] instead.
33588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33589  if test "x$has_forbidden_chars" != x; then
33590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33594      # Going to short mode and back again did indeed matter. Since short mode is
33595      # case insensitive, let's make it lowercase to improve readability.
33596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33597      # Now convert it back to Unix-style (cygpath)
33598      input_path=`$CYGPATH -u "$shortmode_path"`
33599      new_path="$input_path"
33600    fi
33601  fi
33602
33603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33604  if test "x$test_cygdrive_prefix" = x; then
33605    # As a simple fix, exclude /usr/bin since it's not a real path.
33606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33608      # a path prefixed by /cygdrive for fixpath to work.
33609      new_path="$CYGWIN_ROOT_PATH$input_path"
33610    fi
33611  fi
33612
33613
33614  if test "x$path" != "x$new_path"; then
33615    libpath="$new_path"
33616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33617$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33618  fi
33619
33620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33621
33622  path="$libpath"
33623  has_colon=`$ECHO $path | $GREP ^.:`
33624  new_path="$path"
33625  if test "x$has_colon" = x; then
33626    # Not in mixed or Windows style, start by that.
33627    new_path=`cmd //c echo $path`
33628  fi
33629
33630
33631  input_path="$new_path"
33632  # Check if we need to convert this using DOS-style short mode. If the path
33633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33634  # take no chances and rewrite it.
33635  # Note: m4 eats our [], so we need to use [ and ] instead.
33636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33637  if test "x$has_forbidden_chars" != x; then
33638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33640  fi
33641
33642
33643  windows_path="$new_path"
33644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33645    unix_path=`$CYGPATH -u "$windows_path"`
33646    new_path="$unix_path"
33647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33649    new_path="$unix_path"
33650  fi
33651
33652  if test "x$path" != "x$new_path"; then
33653    libpath="$new_path"
33654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33655$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33656  fi
33657
33658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33660
33661    else
33662      # We're on a unix platform. Hooray! :)
33663      path="$libpath"
33664      has_space=`$ECHO "$path" | $GREP " "`
33665      if test "x$has_space" != x; then
33666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33667$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33668        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33669      fi
33670
33671      # Use eval to expand a potential ~
33672      eval path="$path"
33673      if test ! -f "$path" && test ! -d "$path"; then
33674        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33675      fi
33676
33677      if test -d "$path"; then
33678        libpath="`cd "$path"; $THEPWDCMD -L`"
33679      else
33680        dir="`$DIRNAME "$path"`"
33681        base="`$BASENAME "$path"`"
33682        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33683      fi
33684    fi
33685  fi
33686
33687            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33688          fi
33689          IFS=";"
33690        fi
33691      done
33692      IFS="$OLDIFS"
33693    fi
33694  else
33695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33696$as_echo "not found" >&6; }
33697
33698    if test "x$VS_ENV_CMD" = x; then
33699      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33700$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33701      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33702$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33703    else
33704      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33705$as_echo "$as_me: Running the extraction script failed." >&6;}
33706    fi
33707    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33708$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33709    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33710$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33711    as_fn_error $? "Cannot continue" "$LINENO" 5
33712  fi
33713
33714    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33715    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33716    PATH="$VS_PATH"
33717    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33718    export INCLUDE="$VS_INCLUDE"
33719    export LIB="$VS_LIB"
33720  else
33721    if test "x$XCODE_VERSION_OUTPUT" != x; then
33722      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33723      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33724      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33725    else
33726      # Currently we do not define this for other toolchains. This might change as the need arise.
33727      TOOLCHAIN_VERSION=
33728    fi
33729  fi
33730
33731
33732  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33733  # override all other locations.
33734  if test "x$TOOLCHAIN_PATH" != x; then
33735    PATH=$TOOLCHAIN_PATH:$PATH
33736  fi
33737
33738
33739  #
33740  # Setup the compilers (CC and CXX)
33741  #
33742
33743  COMPILER_NAME=C
33744  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33745
33746  if test "x$CC" != x; then
33747    # User has supplied compiler name already, always let that override.
33748    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33749$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33750    if test "x`basename $CC`" = "x$CC"; then
33751      # A command without a complete path is provided, search $PATH.
33752
33753      for ac_prog in $CC
33754do
33755  # Extract the first word of "$ac_prog", so it can be a program name with args.
33756set dummy $ac_prog; ac_word=$2
33757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33758$as_echo_n "checking for $ac_word... " >&6; }
33759if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33760  $as_echo_n "(cached) " >&6
33761else
33762  case $POTENTIAL_CC in
33763  [\\/]* | ?:[\\/]*)
33764  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33765  ;;
33766  *)
33767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33768for as_dir in $PATH
33769do
33770  IFS=$as_save_IFS
33771  test -z "$as_dir" && as_dir=.
33772    for ac_exec_ext in '' $ac_executable_extensions; do
33773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33774    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33776    break 2
33777  fi
33778done
33779  done
33780IFS=$as_save_IFS
33781
33782  ;;
33783esac
33784fi
33785POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33786if test -n "$POTENTIAL_CC"; then
33787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33788$as_echo "$POTENTIAL_CC" >&6; }
33789else
33790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33791$as_echo "no" >&6; }
33792fi
33793
33794
33795  test -n "$POTENTIAL_CC" && break
33796done
33797
33798      if test "x$POTENTIAL_CC" != x; then
33799        CC=$POTENTIAL_CC
33800      else
33801        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33802      fi
33803    else
33804      # Otherwise it might already be a complete path
33805      if test ! -x "$CC"; then
33806        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33807      fi
33808    fi
33809  else
33810    # No user supplied value. Locate compiler ourselves.
33811
33812    # If we are cross compiling, assume cross compilation tools follows the
33813    # cross compilation standard where they are prefixed with the autoconf
33814    # standard name for the target. For example the binary
33815    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33816    # If we are not cross compiling, then the default compiler name will be
33817    # used.
33818
33819    CC=
33820    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33821    # before checking the rest of the PATH.
33822    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33823    # step, this should not be necessary.
33824    if test -n "$TOOLCHAIN_PATH"; then
33825      PATH_save="$PATH"
33826      PATH="$TOOLCHAIN_PATH"
33827      if test -n "$ac_tool_prefix"; then
33828  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33829set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33831$as_echo_n "checking for $ac_word... " >&6; }
33832if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33833  $as_echo_n "(cached) " >&6
33834else
33835  case $TOOLCHAIN_PATH_CC in
33836  [\\/]* | ?:[\\/]*)
33837  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33838  ;;
33839  *)
33840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33841for as_dir in $PATH
33842do
33843  IFS=$as_save_IFS
33844  test -z "$as_dir" && as_dir=.
33845    for ac_exec_ext in '' $ac_executable_extensions; do
33846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33847    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33849    break 2
33850  fi
33851done
33852  done
33853IFS=$as_save_IFS
33854
33855  ;;
33856esac
33857fi
33858TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33859if test -n "$TOOLCHAIN_PATH_CC"; then
33860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33861$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33862else
33863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33864$as_echo "no" >&6; }
33865fi
33866
33867
33868fi
33869if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33870  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33871  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33872set dummy $SEARCH_LIST; ac_word=$2
33873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33874$as_echo_n "checking for $ac_word... " >&6; }
33875if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33876  $as_echo_n "(cached) " >&6
33877else
33878  case $ac_pt_TOOLCHAIN_PATH_CC in
33879  [\\/]* | ?:[\\/]*)
33880  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33881  ;;
33882  *)
33883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33884for as_dir in $PATH
33885do
33886  IFS=$as_save_IFS
33887  test -z "$as_dir" && as_dir=.
33888    for ac_exec_ext in '' $ac_executable_extensions; do
33889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33890    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33892    break 2
33893  fi
33894done
33895  done
33896IFS=$as_save_IFS
33897
33898  ;;
33899esac
33900fi
33901ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33902if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33904$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33905else
33906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33907$as_echo "no" >&6; }
33908fi
33909
33910  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33911    TOOLCHAIN_PATH_CC=""
33912  else
33913    case $cross_compiling:$ac_tool_warned in
33914yes:)
33915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33917ac_tool_warned=yes ;;
33918esac
33919    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33920  fi
33921else
33922  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33923fi
33924
33925      CC=$TOOLCHAIN_PATH_CC
33926      PATH="$PATH_save"
33927    fi
33928
33929    # AC_PATH_TOOL can't be run multiple times with the same variable,
33930    # so create a new name for this run.
33931    if test "x$CC" = x; then
33932      if test -n "$ac_tool_prefix"; then
33933  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33934set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33936$as_echo_n "checking for $ac_word... " >&6; }
33937if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33938  $as_echo_n "(cached) " >&6
33939else
33940  case $POTENTIAL_CC in
33941  [\\/]* | ?:[\\/]*)
33942  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33943  ;;
33944  *)
33945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33946for as_dir in $PATH
33947do
33948  IFS=$as_save_IFS
33949  test -z "$as_dir" && as_dir=.
33950    for ac_exec_ext in '' $ac_executable_extensions; do
33951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33952    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33954    break 2
33955  fi
33956done
33957  done
33958IFS=$as_save_IFS
33959
33960  ;;
33961esac
33962fi
33963POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33964if test -n "$POTENTIAL_CC"; then
33965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33966$as_echo "$POTENTIAL_CC" >&6; }
33967else
33968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33969$as_echo "no" >&6; }
33970fi
33971
33972
33973fi
33974if test -z "$ac_cv_path_POTENTIAL_CC"; then
33975  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33976  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33977set dummy $SEARCH_LIST; ac_word=$2
33978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33979$as_echo_n "checking for $ac_word... " >&6; }
33980if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33981  $as_echo_n "(cached) " >&6
33982else
33983  case $ac_pt_POTENTIAL_CC in
33984  [\\/]* | ?:[\\/]*)
33985  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33986  ;;
33987  *)
33988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33989for as_dir in $PATH
33990do
33991  IFS=$as_save_IFS
33992  test -z "$as_dir" && as_dir=.
33993    for ac_exec_ext in '' $ac_executable_extensions; do
33994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33995    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33997    break 2
33998  fi
33999done
34000  done
34001IFS=$as_save_IFS
34002
34003  ;;
34004esac
34005fi
34006ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34007if test -n "$ac_pt_POTENTIAL_CC"; then
34008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34009$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34010else
34011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34012$as_echo "no" >&6; }
34013fi
34014
34015  if test "x$ac_pt_POTENTIAL_CC" = x; then
34016    POTENTIAL_CC=""
34017  else
34018    case $cross_compiling:$ac_tool_warned in
34019yes:)
34020{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34021$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34022ac_tool_warned=yes ;;
34023esac
34024    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34025  fi
34026else
34027  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34028fi
34029
34030      CC=$POTENTIAL_CC
34031    fi
34032
34033    if test "x$CC" = x; then
34034
34035  # Print a helpful message on how to acquire the necessary build dependency.
34036  # devkit is the help tag: freetype, cups, alsa etc
34037  MISSING_DEPENDENCY=devkit
34038
34039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34040    cygwin_help $MISSING_DEPENDENCY
34041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34042    msys_help $MISSING_DEPENDENCY
34043  else
34044    PKGHANDLER_COMMAND=
34045
34046    case $PKGHANDLER in
34047      apt-get)
34048        apt_help     $MISSING_DEPENDENCY ;;
34049      yum)
34050        yum_help     $MISSING_DEPENDENCY ;;
34051      brew)
34052        brew_help    $MISSING_DEPENDENCY ;;
34053      port)
34054        port_help    $MISSING_DEPENDENCY ;;
34055      pkgutil)
34056        pkgutil_help $MISSING_DEPENDENCY ;;
34057      pkgadd)
34058        pkgadd_help  $MISSING_DEPENDENCY ;;
34059    esac
34060
34061    if test "x$PKGHANDLER_COMMAND" != x; then
34062      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34063    fi
34064  fi
34065
34066      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34067    fi
34068  fi
34069
34070  # Now we have a compiler binary in CC. Make sure it's okay.
34071
34072  # Only process if variable expands to non-empty
34073
34074  if test "x$CC" != x; then
34075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34076
34077  # First separate the path from the arguments. This will split at the first
34078  # space.
34079  complete="$CC"
34080  path="${complete%% *}"
34081  tmp="$complete EOL"
34082  arguments="${tmp#* }"
34083
34084  # Input might be given as Windows format, start by converting to
34085  # unix format.
34086  new_path=`$CYGPATH -u "$path"`
34087
34088  # Now try to locate executable using which
34089  new_path=`$WHICH "$new_path" 2> /dev/null`
34090  # bat and cmd files are not always considered executable in cygwin causing which
34091  # to not find them
34092  if test "x$new_path" = x \
34093      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34094      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34095    new_path=`$CYGPATH -u "$path"`
34096  fi
34097  if test "x$new_path" = x; then
34098    # Oops. Which didn't find the executable.
34099    # The splitting of arguments from the executable at a space might have been incorrect,
34100    # since paths with space are more likely in Windows. Give it another try with the whole
34101    # argument.
34102    path="$complete"
34103    arguments="EOL"
34104    new_path=`$CYGPATH -u "$path"`
34105    new_path=`$WHICH "$new_path" 2> /dev/null`
34106    # bat and cmd files are not always considered executable in cygwin causing which
34107    # to not find them
34108    if test "x$new_path" = x \
34109        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34110        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34111      new_path=`$CYGPATH -u "$path"`
34112    fi
34113    if test "x$new_path" = x; then
34114      # It's still not found. Now this is an unrecoverable error.
34115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34116$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34117      has_space=`$ECHO "$complete" | $GREP " "`
34118      if test "x$has_space" != x; then
34119        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34120$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34121      fi
34122      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34123    fi
34124  fi
34125
34126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34129  # "foo.exe" is OK but "foo" is an error.
34130  #
34131  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34132  # It is also a way to make sure we got the proper file name for the real test later on.
34133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34134  if test "x$test_shortpath" = x; then
34135    # Short path failed, file does not exist as specified.
34136    # Try adding .exe or .cmd
34137    if test -f "${new_path}.exe"; then
34138      input_to_shortpath="${new_path}.exe"
34139    elif test -f "${new_path}.cmd"; then
34140      input_to_shortpath="${new_path}.cmd"
34141    else
34142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34143$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34144      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34145$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34146      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34147    fi
34148  else
34149    input_to_shortpath="$new_path"
34150  fi
34151
34152  # Call helper function which possibly converts this using DOS-style short mode.
34153  # If so, the updated path is stored in $new_path.
34154  new_path="$input_to_shortpath"
34155
34156  input_path="$input_to_shortpath"
34157  # Check if we need to convert this using DOS-style short mode. If the path
34158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34159  # take no chances and rewrite it.
34160  # Note: m4 eats our [], so we need to use [ and ] instead.
34161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34162  if test "x$has_forbidden_chars" != x; then
34163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34167      # Going to short mode and back again did indeed matter. Since short mode is
34168      # case insensitive, let's make it lowercase to improve readability.
34169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34170      # Now convert it back to Unix-style (cygpath)
34171      input_path=`$CYGPATH -u "$shortmode_path"`
34172      new_path="$input_path"
34173    fi
34174  fi
34175
34176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34177  if test "x$test_cygdrive_prefix" = x; then
34178    # As a simple fix, exclude /usr/bin since it's not a real path.
34179    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34181      # a path prefixed by /cygdrive for fixpath to work.
34182      new_path="$CYGWIN_ROOT_PATH$input_path"
34183    fi
34184  fi
34185
34186  # remove trailing .exe if any
34187  new_path="${new_path/%.exe/}"
34188
34189    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34190
34191  # First separate the path from the arguments. This will split at the first
34192  # space.
34193  complete="$CC"
34194  path="${complete%% *}"
34195  tmp="$complete EOL"
34196  arguments="${tmp#* }"
34197
34198  # Input might be given as Windows format, start by converting to
34199  # unix format.
34200  new_path="$path"
34201
34202  windows_path="$new_path"
34203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34204    unix_path=`$CYGPATH -u "$windows_path"`
34205    new_path="$unix_path"
34206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34208    new_path="$unix_path"
34209  fi
34210
34211
34212  # Now try to locate executable using which
34213  new_path=`$WHICH "$new_path" 2> /dev/null`
34214
34215  if test "x$new_path" = x; then
34216    # Oops. Which didn't find the executable.
34217    # The splitting of arguments from the executable at a space might have been incorrect,
34218    # since paths with space are more likely in Windows. Give it another try with the whole
34219    # argument.
34220    path="$complete"
34221    arguments="EOL"
34222    new_path="$path"
34223
34224  windows_path="$new_path"
34225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34226    unix_path=`$CYGPATH -u "$windows_path"`
34227    new_path="$unix_path"
34228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34230    new_path="$unix_path"
34231  fi
34232
34233
34234    new_path=`$WHICH "$new_path" 2> /dev/null`
34235    # bat and cmd files are not always considered executable in MSYS causing which
34236    # to not find them
34237    if test "x$new_path" = x \
34238        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34239        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34240      new_path="$path"
34241
34242  windows_path="$new_path"
34243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34244    unix_path=`$CYGPATH -u "$windows_path"`
34245    new_path="$unix_path"
34246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34248    new_path="$unix_path"
34249  fi
34250
34251    fi
34252
34253    if test "x$new_path" = x; then
34254      # It's still not found. Now this is an unrecoverable error.
34255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34256$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34257      has_space=`$ECHO "$complete" | $GREP " "`
34258      if test "x$has_space" != x; then
34259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34261      fi
34262      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34263    fi
34264  fi
34265
34266  # Now new_path has a complete unix path to the binary
34267  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34268    # Keep paths in /bin as-is, but remove trailing .exe if any
34269    new_path="${new_path/%.exe/}"
34270    # Do not save /bin paths to all_fixpath_prefixes!
34271  else
34272    # Not in mixed or Windows style, start by that.
34273    new_path=`cmd //c echo $new_path`
34274
34275  input_path="$new_path"
34276  # Check if we need to convert this using DOS-style short mode. If the path
34277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34278  # take no chances and rewrite it.
34279  # Note: m4 eats our [], so we need to use [ and ] instead.
34280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34281  if test "x$has_forbidden_chars" != x; then
34282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34284  fi
34285
34286    # Output is in $new_path
34287
34288  windows_path="$new_path"
34289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34290    unix_path=`$CYGPATH -u "$windows_path"`
34291    new_path="$unix_path"
34292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34294    new_path="$unix_path"
34295  fi
34296
34297    # remove trailing .exe if any
34298    new_path="${new_path/%.exe/}"
34299
34300    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34301    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34302  fi
34303
34304    else
34305      # We're on a unix platform. Hooray! :)
34306      # First separate the path from the arguments. This will split at the first
34307      # space.
34308      complete="$CC"
34309      path="${complete%% *}"
34310      tmp="$complete EOL"
34311      arguments="${tmp#* }"
34312
34313      # Cannot rely on the command "which" here since it doesn't always work.
34314      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34315      if test -z "$is_absolute_path"; then
34316        # Path to executable is not absolute. Find it.
34317        IFS_save="$IFS"
34318        IFS=:
34319        for p in $PATH; do
34320          if test -f "$p/$path" && test -x "$p/$path"; then
34321            new_path="$p/$path"
34322            break
34323          fi
34324        done
34325        IFS="$IFS_save"
34326      else
34327        # This is an absolute path, we can use it without further modifications.
34328        new_path="$path"
34329      fi
34330
34331      if test "x$new_path" = x; then
34332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34333$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34334        has_space=`$ECHO "$complete" | $GREP " "`
34335        if test "x$has_space" != x; then
34336          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34337$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34338        fi
34339        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34340      fi
34341    fi
34342
34343    # Now join together the path and the arguments once again
34344    if test "x$arguments" != xEOL; then
34345      new_complete="$new_path ${arguments% *}"
34346    else
34347      new_complete="$new_path"
34348    fi
34349
34350    if test "x$complete" != "x$new_complete"; then
34351      CC="$new_complete"
34352      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34353$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34354    fi
34355  fi
34356
34357  TEST_COMPILER="$CC"
34358
34359  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34360$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34361  SYMLINK_ORIGINAL="$TEST_COMPILER"
34362
34363  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34364    # Follow a chain of symbolic links. Use readlink
34365    # where it exists, else fall back to horribly
34366    # complicated shell code.
34367    if test "x$READLINK_TESTED" != yes; then
34368      # On MacOSX there is a readlink tool with a different
34369      # purpose than the GNU readlink tool. Check the found readlink.
34370      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34371      if test "x$ISGNU" = x; then
34372        # A readlink that we do not know how to use.
34373        # Are there other non-GNU readlinks out there?
34374        READLINK_TESTED=yes
34375        READLINK=
34376      fi
34377    fi
34378
34379    if test "x$READLINK" != x; then
34380      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34381    else
34382      # Save the current directory for restoring afterwards
34383      STARTDIR=$PWD
34384      COUNTER=0
34385      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34386      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34387      cd $sym_link_dir
34388      # Use -P flag to resolve symlinks in directories.
34389      cd `$THEPWDCMD -P`
34390      sym_link_dir=`$THEPWDCMD -P`
34391      # Resolve file symlinks
34392      while test $COUNTER -lt 20; do
34393        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34394        if test "x$ISLINK" == x; then
34395          # This is not a symbolic link! We are done!
34396          break
34397        fi
34398        # Again resolve directory symlinks since the target of the just found
34399        # link could be in a different directory
34400        cd `$DIRNAME $ISLINK`
34401        sym_link_dir=`$THEPWDCMD -P`
34402        sym_link_file=`$BASENAME $ISLINK`
34403        let COUNTER=COUNTER+1
34404      done
34405      cd $STARTDIR
34406      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34407    fi
34408  fi
34409
34410  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34412$as_echo "no symlink" >&6; }
34413  else
34414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34415$as_echo "$SYMLINK_ORIGINAL" >&6; }
34416
34417    # We can't handle ccache by gcc wrappers, since we need to know if we're
34418    # using ccache. Instead ccache usage must be controlled by a configure option.
34419    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34420    if test "x$COMPILER_BASENAME" = "xccache"; then
34421      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34422$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34423      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34424    fi
34425  fi
34426
34427
34428  COMPILER=$CC
34429  COMPILER_NAME=$COMPILER_NAME
34430
34431  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34432    # cc -V output typically looks like
34433    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34434    # or
34435    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34436    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34437    # Check that this is likely to be the Solaris Studio cc.
34438    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34439    if test $? -ne 0; then
34440      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34441      { $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
34442$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34443      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34444$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34445      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34446$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34447      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34448    fi
34449    # Remove usage instructions (if present), and
34450    # collapse compiler output into a single line
34451    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34452        $SED -e 's/ *[Uu]sage:.*//'`
34453    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34454        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34455  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34456    # xlc -qversion output typically looks like
34457    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34458    #     Version: 11.01.0000.0015
34459    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34460    # Check that this is likely to be the IBM XL C compiler.
34461    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34462    if test $? -ne 0; then
34463      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34464      { $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
34465$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34466      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34467$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34468      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34469$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34470      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34471    fi
34472    # Collapse compiler output into a single line
34473    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34474    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34475        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34476  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34477    # There is no specific version flag, but all output starts with a version string.
34478    # First line typically looks something like:
34479    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34480    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34481    # Check that this is likely to be Microsoft CL.EXE.
34482    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34483    if test $? -ne 0; then
34484      { $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
34485$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34486      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34487$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34488      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34489    fi
34490    # Collapse compiler output into a single line
34491    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34492    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34493        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34494  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34495    # gcc --version output typically looks like
34496    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34497    #     Copyright (C) 2013 Free Software Foundation, Inc.
34498    #     This is free software; see the source for copying conditions.  There is NO
34499    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34500    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34501    # Check that this is likely to be GCC.
34502    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34503    if test $? -ne 0; then
34504      { $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
34505$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34506      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34507$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34508      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34509    fi
34510    # Remove Copyright and legalese from version string, and
34511    # collapse into a single line
34512    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34513        $SED -e 's/ *Copyright .*//'`
34514    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34515        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34516  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34517    # clang --version output typically looks like
34518    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34519    #    clang version 3.3 (tags/RELEASE_33/final)
34520    # or
34521    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34522    #    Target: x86_64-pc-linux-gnu
34523    #    Thread model: posix
34524    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34525    # Check that this is likely to be clang
34526    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34527    if test $? -ne 0; then
34528      { $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
34529$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34530      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34531$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34532      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34533    fi
34534    # Collapse compiler output into a single line
34535    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34536    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34537        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34538  else
34539      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34540  fi
34541  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34542  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34543  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34544  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34545
34546  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34547$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34548
34549
34550  # Now that we have resolved CC ourself, let autoconf have its go at it
34551  ac_ext=c
34552ac_cpp='$CPP $CPPFLAGS'
34553ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34554ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34555ac_compiler_gnu=$ac_cv_c_compiler_gnu
34556if test -n "$ac_tool_prefix"; then
34557  for ac_prog in $CC
34558  do
34559    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34560set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34562$as_echo_n "checking for $ac_word... " >&6; }
34563if ${ac_cv_prog_CC+:} false; then :
34564  $as_echo_n "(cached) " >&6
34565else
34566  if test -n "$CC"; then
34567  ac_cv_prog_CC="$CC" # Let the user override the test.
34568else
34569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34570for as_dir in $PATH
34571do
34572  IFS=$as_save_IFS
34573  test -z "$as_dir" && as_dir=.
34574    for ac_exec_ext in '' $ac_executable_extensions; do
34575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34576    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34578    break 2
34579  fi
34580done
34581  done
34582IFS=$as_save_IFS
34583
34584fi
34585fi
34586CC=$ac_cv_prog_CC
34587if test -n "$CC"; then
34588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34589$as_echo "$CC" >&6; }
34590else
34591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34592$as_echo "no" >&6; }
34593fi
34594
34595
34596    test -n "$CC" && break
34597  done
34598fi
34599if test -z "$CC"; then
34600  ac_ct_CC=$CC
34601  for ac_prog in $CC
34602do
34603  # Extract the first word of "$ac_prog", so it can be a program name with args.
34604set dummy $ac_prog; ac_word=$2
34605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34606$as_echo_n "checking for $ac_word... " >&6; }
34607if ${ac_cv_prog_ac_ct_CC+:} false; then :
34608  $as_echo_n "(cached) " >&6
34609else
34610  if test -n "$ac_ct_CC"; then
34611  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34612else
34613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34614for as_dir in $PATH
34615do
34616  IFS=$as_save_IFS
34617  test -z "$as_dir" && as_dir=.
34618    for ac_exec_ext in '' $ac_executable_extensions; do
34619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34620    ac_cv_prog_ac_ct_CC="$ac_prog"
34621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34622    break 2
34623  fi
34624done
34625  done
34626IFS=$as_save_IFS
34627
34628fi
34629fi
34630ac_ct_CC=$ac_cv_prog_ac_ct_CC
34631if test -n "$ac_ct_CC"; then
34632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34633$as_echo "$ac_ct_CC" >&6; }
34634else
34635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34636$as_echo "no" >&6; }
34637fi
34638
34639
34640  test -n "$ac_ct_CC" && break
34641done
34642
34643  if test "x$ac_ct_CC" = x; then
34644    CC=""
34645  else
34646    case $cross_compiling:$ac_tool_warned in
34647yes:)
34648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34650ac_tool_warned=yes ;;
34651esac
34652    CC=$ac_ct_CC
34653  fi
34654fi
34655
34656
34657test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34659as_fn_error $? "no acceptable C compiler found in \$PATH
34660See \`config.log' for more details" "$LINENO" 5; }
34661
34662# Provide some information about the compiler.
34663$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34664set X $ac_compile
34665ac_compiler=$2
34666for ac_option in --version -v -V -qversion; do
34667  { { ac_try="$ac_compiler $ac_option >&5"
34668case "(($ac_try" in
34669  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34670  *) ac_try_echo=$ac_try;;
34671esac
34672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34673$as_echo "$ac_try_echo"; } >&5
34674  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34675  ac_status=$?
34676  if test -s conftest.err; then
34677    sed '10a\
34678... rest of stderr output deleted ...
34679         10q' conftest.err >conftest.er1
34680    cat conftest.er1 >&5
34681  fi
34682  rm -f conftest.er1 conftest.err
34683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34684  test $ac_status = 0; }
34685done
34686
34687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34688/* end confdefs.h.  */
34689
34690int
34691main ()
34692{
34693
34694  ;
34695  return 0;
34696}
34697_ACEOF
34698ac_clean_files_save=$ac_clean_files
34699ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34700# Try to create an executable without -o first, disregard a.out.
34701# It will help us diagnose broken compilers, and finding out an intuition
34702# of exeext.
34703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34704$as_echo_n "checking whether the C compiler works... " >&6; }
34705ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34706
34707# The possible output files:
34708ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34709
34710ac_rmfiles=
34711for ac_file in $ac_files
34712do
34713  case $ac_file in
34714    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34715    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34716  esac
34717done
34718rm -f $ac_rmfiles
34719
34720if { { ac_try="$ac_link_default"
34721case "(($ac_try" in
34722  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34723  *) ac_try_echo=$ac_try;;
34724esac
34725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34726$as_echo "$ac_try_echo"; } >&5
34727  (eval "$ac_link_default") 2>&5
34728  ac_status=$?
34729  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34730  test $ac_status = 0; }; then :
34731  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34732# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34733# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34734# so that the user can short-circuit this test for compilers unknown to
34735# Autoconf.
34736for ac_file in $ac_files ''
34737do
34738  test -f "$ac_file" || continue
34739  case $ac_file in
34740    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34741	;;
34742    [ab].out )
34743	# We found the default executable, but exeext='' is most
34744	# certainly right.
34745	break;;
34746    *.* )
34747	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34748	then :; else
34749	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34750	fi
34751	# We set ac_cv_exeext here because the later test for it is not
34752	# safe: cross compilers may not add the suffix if given an `-o'
34753	# argument, so we may need to know it at that point already.
34754	# Even if this section looks crufty: it has the advantage of
34755	# actually working.
34756	break;;
34757    * )
34758	break;;
34759  esac
34760done
34761test "$ac_cv_exeext" = no && ac_cv_exeext=
34762
34763else
34764  ac_file=''
34765fi
34766if test -z "$ac_file"; then :
34767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34768$as_echo "no" >&6; }
34769$as_echo "$as_me: failed program was:" >&5
34770sed 's/^/| /' conftest.$ac_ext >&5
34771
34772{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34774as_fn_error 77 "C compiler cannot create executables
34775See \`config.log' for more details" "$LINENO" 5; }
34776else
34777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34778$as_echo "yes" >&6; }
34779fi
34780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34781$as_echo_n "checking for C compiler default output file name... " >&6; }
34782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34783$as_echo "$ac_file" >&6; }
34784ac_exeext=$ac_cv_exeext
34785
34786rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34787ac_clean_files=$ac_clean_files_save
34788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34789$as_echo_n "checking for suffix of executables... " >&6; }
34790if { { ac_try="$ac_link"
34791case "(($ac_try" in
34792  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34793  *) ac_try_echo=$ac_try;;
34794esac
34795eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34796$as_echo "$ac_try_echo"; } >&5
34797  (eval "$ac_link") 2>&5
34798  ac_status=$?
34799  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34800  test $ac_status = 0; }; then :
34801  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34802# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34803# work properly (i.e., refer to `conftest.exe'), while it won't with
34804# `rm'.
34805for ac_file in conftest.exe conftest conftest.*; do
34806  test -f "$ac_file" || continue
34807  case $ac_file in
34808    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34809    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34810	  break;;
34811    * ) break;;
34812  esac
34813done
34814else
34815  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34817as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34818See \`config.log' for more details" "$LINENO" 5; }
34819fi
34820rm -f conftest conftest$ac_cv_exeext
34821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34822$as_echo "$ac_cv_exeext" >&6; }
34823
34824rm -f conftest.$ac_ext
34825EXEEXT=$ac_cv_exeext
34826ac_exeext=$EXEEXT
34827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34828/* end confdefs.h.  */
34829#include <stdio.h>
34830int
34831main ()
34832{
34833FILE *f = fopen ("conftest.out", "w");
34834 return ferror (f) || fclose (f) != 0;
34835
34836  ;
34837  return 0;
34838}
34839_ACEOF
34840ac_clean_files="$ac_clean_files conftest.out"
34841# Check that the compiler produces executables we can run.  If not, either
34842# the compiler is broken, or we cross compile.
34843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34844$as_echo_n "checking whether we are cross compiling... " >&6; }
34845if test "$cross_compiling" != yes; then
34846  { { ac_try="$ac_link"
34847case "(($ac_try" in
34848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34849  *) ac_try_echo=$ac_try;;
34850esac
34851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34852$as_echo "$ac_try_echo"; } >&5
34853  (eval "$ac_link") 2>&5
34854  ac_status=$?
34855  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34856  test $ac_status = 0; }
34857  if { ac_try='./conftest$ac_cv_exeext'
34858  { { case "(($ac_try" in
34859  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34860  *) ac_try_echo=$ac_try;;
34861esac
34862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34863$as_echo "$ac_try_echo"; } >&5
34864  (eval "$ac_try") 2>&5
34865  ac_status=$?
34866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34867  test $ac_status = 0; }; }; then
34868    cross_compiling=no
34869  else
34870    if test "$cross_compiling" = maybe; then
34871	cross_compiling=yes
34872    else
34873	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34875as_fn_error $? "cannot run C compiled programs.
34876If you meant to cross compile, use \`--host'.
34877See \`config.log' for more details" "$LINENO" 5; }
34878    fi
34879  fi
34880fi
34881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34882$as_echo "$cross_compiling" >&6; }
34883
34884rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34885ac_clean_files=$ac_clean_files_save
34886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34887$as_echo_n "checking for suffix of object files... " >&6; }
34888if ${ac_cv_objext+:} false; then :
34889  $as_echo_n "(cached) " >&6
34890else
34891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34892/* end confdefs.h.  */
34893
34894int
34895main ()
34896{
34897
34898  ;
34899  return 0;
34900}
34901_ACEOF
34902rm -f conftest.o conftest.obj
34903if { { ac_try="$ac_compile"
34904case "(($ac_try" in
34905  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34906  *) ac_try_echo=$ac_try;;
34907esac
34908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34909$as_echo "$ac_try_echo"; } >&5
34910  (eval "$ac_compile") 2>&5
34911  ac_status=$?
34912  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34913  test $ac_status = 0; }; then :
34914  for ac_file in conftest.o conftest.obj conftest.*; do
34915  test -f "$ac_file" || continue;
34916  case $ac_file in
34917    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34918    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34919       break;;
34920  esac
34921done
34922else
34923  $as_echo "$as_me: failed program was:" >&5
34924sed 's/^/| /' conftest.$ac_ext >&5
34925
34926{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34928as_fn_error $? "cannot compute suffix of object files: cannot compile
34929See \`config.log' for more details" "$LINENO" 5; }
34930fi
34931rm -f conftest.$ac_cv_objext conftest.$ac_ext
34932fi
34933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34934$as_echo "$ac_cv_objext" >&6; }
34935OBJEXT=$ac_cv_objext
34936ac_objext=$OBJEXT
34937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34938$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34939if ${ac_cv_c_compiler_gnu+:} false; then :
34940  $as_echo_n "(cached) " >&6
34941else
34942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34943/* end confdefs.h.  */
34944
34945int
34946main ()
34947{
34948#ifndef __GNUC__
34949       choke me
34950#endif
34951
34952  ;
34953  return 0;
34954}
34955_ACEOF
34956if ac_fn_c_try_compile "$LINENO"; then :
34957  ac_compiler_gnu=yes
34958else
34959  ac_compiler_gnu=no
34960fi
34961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34962ac_cv_c_compiler_gnu=$ac_compiler_gnu
34963
34964fi
34965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34966$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34967if test $ac_compiler_gnu = yes; then
34968  GCC=yes
34969else
34970  GCC=
34971fi
34972ac_test_CFLAGS=${CFLAGS+set}
34973ac_save_CFLAGS=$CFLAGS
34974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34975$as_echo_n "checking whether $CC accepts -g... " >&6; }
34976if ${ac_cv_prog_cc_g+:} false; then :
34977  $as_echo_n "(cached) " >&6
34978else
34979  ac_save_c_werror_flag=$ac_c_werror_flag
34980   ac_c_werror_flag=yes
34981   ac_cv_prog_cc_g=no
34982   CFLAGS="-g"
34983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34984/* end confdefs.h.  */
34985
34986int
34987main ()
34988{
34989
34990  ;
34991  return 0;
34992}
34993_ACEOF
34994if ac_fn_c_try_compile "$LINENO"; then :
34995  ac_cv_prog_cc_g=yes
34996else
34997  CFLAGS=""
34998      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34999/* end confdefs.h.  */
35000
35001int
35002main ()
35003{
35004
35005  ;
35006  return 0;
35007}
35008_ACEOF
35009if ac_fn_c_try_compile "$LINENO"; then :
35010
35011else
35012  ac_c_werror_flag=$ac_save_c_werror_flag
35013	 CFLAGS="-g"
35014	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35015/* end confdefs.h.  */
35016
35017int
35018main ()
35019{
35020
35021  ;
35022  return 0;
35023}
35024_ACEOF
35025if ac_fn_c_try_compile "$LINENO"; then :
35026  ac_cv_prog_cc_g=yes
35027fi
35028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35029fi
35030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35031fi
35032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35033   ac_c_werror_flag=$ac_save_c_werror_flag
35034fi
35035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35036$as_echo "$ac_cv_prog_cc_g" >&6; }
35037if test "$ac_test_CFLAGS" = set; then
35038  CFLAGS=$ac_save_CFLAGS
35039elif test $ac_cv_prog_cc_g = yes; then
35040  if test "$GCC" = yes; then
35041    CFLAGS="-g -O2"
35042  else
35043    CFLAGS="-g"
35044  fi
35045else
35046  if test "$GCC" = yes; then
35047    CFLAGS="-O2"
35048  else
35049    CFLAGS=
35050  fi
35051fi
35052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35053$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35054if ${ac_cv_prog_cc_c89+:} false; then :
35055  $as_echo_n "(cached) " >&6
35056else
35057  ac_cv_prog_cc_c89=no
35058ac_save_CC=$CC
35059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35060/* end confdefs.h.  */
35061#include <stdarg.h>
35062#include <stdio.h>
35063struct stat;
35064/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35065struct buf { int x; };
35066FILE * (*rcsopen) (struct buf *, struct stat *, int);
35067static char *e (p, i)
35068     char **p;
35069     int i;
35070{
35071  return p[i];
35072}
35073static char *f (char * (*g) (char **, int), char **p, ...)
35074{
35075  char *s;
35076  va_list v;
35077  va_start (v,p);
35078  s = g (p, va_arg (v,int));
35079  va_end (v);
35080  return s;
35081}
35082
35083/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35084   function prototypes and stuff, but not '\xHH' hex character constants.
35085   These don't provoke an error unfortunately, instead are silently treated
35086   as 'x'.  The following induces an error, until -std is added to get
35087   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35088   array size at least.  It's necessary to write '\x00'==0 to get something
35089   that's true only with -std.  */
35090int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35091
35092/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35093   inside strings and character constants.  */
35094#define FOO(x) 'x'
35095int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35096
35097int test (int i, double x);
35098struct s1 {int (*f) (int a);};
35099struct s2 {int (*f) (double a);};
35100int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35101int argc;
35102char **argv;
35103int
35104main ()
35105{
35106return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35107  ;
35108  return 0;
35109}
35110_ACEOF
35111for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35112	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35113do
35114  CC="$ac_save_CC $ac_arg"
35115  if ac_fn_c_try_compile "$LINENO"; then :
35116  ac_cv_prog_cc_c89=$ac_arg
35117fi
35118rm -f core conftest.err conftest.$ac_objext
35119  test "x$ac_cv_prog_cc_c89" != "xno" && break
35120done
35121rm -f conftest.$ac_ext
35122CC=$ac_save_CC
35123
35124fi
35125# AC_CACHE_VAL
35126case "x$ac_cv_prog_cc_c89" in
35127  x)
35128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35129$as_echo "none needed" >&6; } ;;
35130  xno)
35131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35132$as_echo "unsupported" >&6; } ;;
35133  *)
35134    CC="$CC $ac_cv_prog_cc_c89"
35135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35136$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35137esac
35138if test "x$ac_cv_prog_cc_c89" != xno; then :
35139
35140fi
35141
35142ac_ext=cpp
35143ac_cpp='$CXXCPP $CPPFLAGS'
35144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35147
35148
35149
35150  COMPILER_NAME=C++
35151  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35152
35153  if test "x$CXX" != x; then
35154    # User has supplied compiler name already, always let that override.
35155    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35156$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35157    if test "x`basename $CXX`" = "x$CXX"; then
35158      # A command without a complete path is provided, search $PATH.
35159
35160      for ac_prog in $CXX
35161do
35162  # Extract the first word of "$ac_prog", so it can be a program name with args.
35163set dummy $ac_prog; ac_word=$2
35164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35165$as_echo_n "checking for $ac_word... " >&6; }
35166if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35167  $as_echo_n "(cached) " >&6
35168else
35169  case $POTENTIAL_CXX in
35170  [\\/]* | ?:[\\/]*)
35171  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35172  ;;
35173  *)
35174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35175for as_dir in $PATH
35176do
35177  IFS=$as_save_IFS
35178  test -z "$as_dir" && as_dir=.
35179    for ac_exec_ext in '' $ac_executable_extensions; do
35180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35181    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35183    break 2
35184  fi
35185done
35186  done
35187IFS=$as_save_IFS
35188
35189  ;;
35190esac
35191fi
35192POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35193if test -n "$POTENTIAL_CXX"; then
35194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35195$as_echo "$POTENTIAL_CXX" >&6; }
35196else
35197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35198$as_echo "no" >&6; }
35199fi
35200
35201
35202  test -n "$POTENTIAL_CXX" && break
35203done
35204
35205      if test "x$POTENTIAL_CXX" != x; then
35206        CXX=$POTENTIAL_CXX
35207      else
35208        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35209      fi
35210    else
35211      # Otherwise it might already be a complete path
35212      if test ! -x "$CXX"; then
35213        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35214      fi
35215    fi
35216  else
35217    # No user supplied value. Locate compiler ourselves.
35218
35219    # If we are cross compiling, assume cross compilation tools follows the
35220    # cross compilation standard where they are prefixed with the autoconf
35221    # standard name for the target. For example the binary
35222    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35223    # If we are not cross compiling, then the default compiler name will be
35224    # used.
35225
35226    CXX=
35227    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35228    # before checking the rest of the PATH.
35229    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35230    # step, this should not be necessary.
35231    if test -n "$TOOLCHAIN_PATH"; then
35232      PATH_save="$PATH"
35233      PATH="$TOOLCHAIN_PATH"
35234      if test -n "$ac_tool_prefix"; then
35235  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35236set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35238$as_echo_n "checking for $ac_word... " >&6; }
35239if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35240  $as_echo_n "(cached) " >&6
35241else
35242  case $TOOLCHAIN_PATH_CXX in
35243  [\\/]* | ?:[\\/]*)
35244  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35245  ;;
35246  *)
35247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35248for as_dir in $PATH
35249do
35250  IFS=$as_save_IFS
35251  test -z "$as_dir" && as_dir=.
35252    for ac_exec_ext in '' $ac_executable_extensions; do
35253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35254    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35256    break 2
35257  fi
35258done
35259  done
35260IFS=$as_save_IFS
35261
35262  ;;
35263esac
35264fi
35265TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35266if test -n "$TOOLCHAIN_PATH_CXX"; then
35267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35268$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35269else
35270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35271$as_echo "no" >&6; }
35272fi
35273
35274
35275fi
35276if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35277  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35278  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35279set dummy $SEARCH_LIST; ac_word=$2
35280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35281$as_echo_n "checking for $ac_word... " >&6; }
35282if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35283  $as_echo_n "(cached) " >&6
35284else
35285  case $ac_pt_TOOLCHAIN_PATH_CXX in
35286  [\\/]* | ?:[\\/]*)
35287  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35288  ;;
35289  *)
35290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35291for as_dir in $PATH
35292do
35293  IFS=$as_save_IFS
35294  test -z "$as_dir" && as_dir=.
35295    for ac_exec_ext in '' $ac_executable_extensions; do
35296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35297    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35299    break 2
35300  fi
35301done
35302  done
35303IFS=$as_save_IFS
35304
35305  ;;
35306esac
35307fi
35308ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35309if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35311$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35312else
35313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35314$as_echo "no" >&6; }
35315fi
35316
35317  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35318    TOOLCHAIN_PATH_CXX=""
35319  else
35320    case $cross_compiling:$ac_tool_warned in
35321yes:)
35322{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35323$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35324ac_tool_warned=yes ;;
35325esac
35326    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35327  fi
35328else
35329  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35330fi
35331
35332      CXX=$TOOLCHAIN_PATH_CXX
35333      PATH="$PATH_save"
35334    fi
35335
35336    # AC_PATH_TOOL can't be run multiple times with the same variable,
35337    # so create a new name for this run.
35338    if test "x$CXX" = x; then
35339      if test -n "$ac_tool_prefix"; then
35340  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35341set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35343$as_echo_n "checking for $ac_word... " >&6; }
35344if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35345  $as_echo_n "(cached) " >&6
35346else
35347  case $POTENTIAL_CXX in
35348  [\\/]* | ?:[\\/]*)
35349  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35350  ;;
35351  *)
35352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35353for as_dir in $PATH
35354do
35355  IFS=$as_save_IFS
35356  test -z "$as_dir" && as_dir=.
35357    for ac_exec_ext in '' $ac_executable_extensions; do
35358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35359    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35361    break 2
35362  fi
35363done
35364  done
35365IFS=$as_save_IFS
35366
35367  ;;
35368esac
35369fi
35370POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35371if test -n "$POTENTIAL_CXX"; then
35372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35373$as_echo "$POTENTIAL_CXX" >&6; }
35374else
35375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35376$as_echo "no" >&6; }
35377fi
35378
35379
35380fi
35381if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35382  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35383  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35384set dummy $SEARCH_LIST; ac_word=$2
35385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35386$as_echo_n "checking for $ac_word... " >&6; }
35387if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35388  $as_echo_n "(cached) " >&6
35389else
35390  case $ac_pt_POTENTIAL_CXX in
35391  [\\/]* | ?:[\\/]*)
35392  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35393  ;;
35394  *)
35395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35396for as_dir in $PATH
35397do
35398  IFS=$as_save_IFS
35399  test -z "$as_dir" && as_dir=.
35400    for ac_exec_ext in '' $ac_executable_extensions; do
35401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35402    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35404    break 2
35405  fi
35406done
35407  done
35408IFS=$as_save_IFS
35409
35410  ;;
35411esac
35412fi
35413ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35414if test -n "$ac_pt_POTENTIAL_CXX"; then
35415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35416$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35417else
35418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35419$as_echo "no" >&6; }
35420fi
35421
35422  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35423    POTENTIAL_CXX=""
35424  else
35425    case $cross_compiling:$ac_tool_warned in
35426yes:)
35427{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35428$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35429ac_tool_warned=yes ;;
35430esac
35431    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35432  fi
35433else
35434  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35435fi
35436
35437      CXX=$POTENTIAL_CXX
35438    fi
35439
35440    if test "x$CXX" = x; then
35441
35442  # Print a helpful message on how to acquire the necessary build dependency.
35443  # devkit is the help tag: freetype, cups, alsa etc
35444  MISSING_DEPENDENCY=devkit
35445
35446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35447    cygwin_help $MISSING_DEPENDENCY
35448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35449    msys_help $MISSING_DEPENDENCY
35450  else
35451    PKGHANDLER_COMMAND=
35452
35453    case $PKGHANDLER in
35454      apt-get)
35455        apt_help     $MISSING_DEPENDENCY ;;
35456      yum)
35457        yum_help     $MISSING_DEPENDENCY ;;
35458      brew)
35459        brew_help    $MISSING_DEPENDENCY ;;
35460      port)
35461        port_help    $MISSING_DEPENDENCY ;;
35462      pkgutil)
35463        pkgutil_help $MISSING_DEPENDENCY ;;
35464      pkgadd)
35465        pkgadd_help  $MISSING_DEPENDENCY ;;
35466    esac
35467
35468    if test "x$PKGHANDLER_COMMAND" != x; then
35469      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35470    fi
35471  fi
35472
35473      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35474    fi
35475  fi
35476
35477  # Now we have a compiler binary in CXX. Make sure it's okay.
35478
35479  # Only process if variable expands to non-empty
35480
35481  if test "x$CXX" != x; then
35482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35483
35484  # First separate the path from the arguments. This will split at the first
35485  # space.
35486  complete="$CXX"
35487  path="${complete%% *}"
35488  tmp="$complete EOL"
35489  arguments="${tmp#* }"
35490
35491  # Input might be given as Windows format, start by converting to
35492  # unix format.
35493  new_path=`$CYGPATH -u "$path"`
35494
35495  # Now try to locate executable using which
35496  new_path=`$WHICH "$new_path" 2> /dev/null`
35497  # bat and cmd files are not always considered executable in cygwin causing which
35498  # to not find them
35499  if test "x$new_path" = x \
35500      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35501      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35502    new_path=`$CYGPATH -u "$path"`
35503  fi
35504  if test "x$new_path" = x; then
35505    # Oops. Which didn't find the executable.
35506    # The splitting of arguments from the executable at a space might have been incorrect,
35507    # since paths with space are more likely in Windows. Give it another try with the whole
35508    # argument.
35509    path="$complete"
35510    arguments="EOL"
35511    new_path=`$CYGPATH -u "$path"`
35512    new_path=`$WHICH "$new_path" 2> /dev/null`
35513    # bat and cmd files are not always considered executable in cygwin causing which
35514    # to not find them
35515    if test "x$new_path" = x \
35516        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35517        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35518      new_path=`$CYGPATH -u "$path"`
35519    fi
35520    if test "x$new_path" = x; then
35521      # It's still not found. Now this is an unrecoverable error.
35522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35523$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35524      has_space=`$ECHO "$complete" | $GREP " "`
35525      if test "x$has_space" != x; then
35526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35528      fi
35529      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35530    fi
35531  fi
35532
35533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35536  # "foo.exe" is OK but "foo" is an error.
35537  #
35538  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35539  # It is also a way to make sure we got the proper file name for the real test later on.
35540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35541  if test "x$test_shortpath" = x; then
35542    # Short path failed, file does not exist as specified.
35543    # Try adding .exe or .cmd
35544    if test -f "${new_path}.exe"; then
35545      input_to_shortpath="${new_path}.exe"
35546    elif test -f "${new_path}.cmd"; then
35547      input_to_shortpath="${new_path}.cmd"
35548    else
35549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35550$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35551      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35552$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35553      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35554    fi
35555  else
35556    input_to_shortpath="$new_path"
35557  fi
35558
35559  # Call helper function which possibly converts this using DOS-style short mode.
35560  # If so, the updated path is stored in $new_path.
35561  new_path="$input_to_shortpath"
35562
35563  input_path="$input_to_shortpath"
35564  # Check if we need to convert this using DOS-style short mode. If the path
35565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35566  # take no chances and rewrite it.
35567  # Note: m4 eats our [], so we need to use [ and ] instead.
35568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35569  if test "x$has_forbidden_chars" != x; then
35570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35574      # Going to short mode and back again did indeed matter. Since short mode is
35575      # case insensitive, let's make it lowercase to improve readability.
35576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35577      # Now convert it back to Unix-style (cygpath)
35578      input_path=`$CYGPATH -u "$shortmode_path"`
35579      new_path="$input_path"
35580    fi
35581  fi
35582
35583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35584  if test "x$test_cygdrive_prefix" = x; then
35585    # As a simple fix, exclude /usr/bin since it's not a real path.
35586    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35588      # a path prefixed by /cygdrive for fixpath to work.
35589      new_path="$CYGWIN_ROOT_PATH$input_path"
35590    fi
35591  fi
35592
35593  # remove trailing .exe if any
35594  new_path="${new_path/%.exe/}"
35595
35596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35597
35598  # First separate the path from the arguments. This will split at the first
35599  # space.
35600  complete="$CXX"
35601  path="${complete%% *}"
35602  tmp="$complete EOL"
35603  arguments="${tmp#* }"
35604
35605  # Input might be given as Windows format, start by converting to
35606  # unix format.
35607  new_path="$path"
35608
35609  windows_path="$new_path"
35610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35611    unix_path=`$CYGPATH -u "$windows_path"`
35612    new_path="$unix_path"
35613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35615    new_path="$unix_path"
35616  fi
35617
35618
35619  # Now try to locate executable using which
35620  new_path=`$WHICH "$new_path" 2> /dev/null`
35621
35622  if test "x$new_path" = x; then
35623    # Oops. Which didn't find the executable.
35624    # The splitting of arguments from the executable at a space might have been incorrect,
35625    # since paths with space are more likely in Windows. Give it another try with the whole
35626    # argument.
35627    path="$complete"
35628    arguments="EOL"
35629    new_path="$path"
35630
35631  windows_path="$new_path"
35632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35633    unix_path=`$CYGPATH -u "$windows_path"`
35634    new_path="$unix_path"
35635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35637    new_path="$unix_path"
35638  fi
35639
35640
35641    new_path=`$WHICH "$new_path" 2> /dev/null`
35642    # bat and cmd files are not always considered executable in MSYS causing which
35643    # to not find them
35644    if test "x$new_path" = x \
35645        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35646        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35647      new_path="$path"
35648
35649  windows_path="$new_path"
35650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35651    unix_path=`$CYGPATH -u "$windows_path"`
35652    new_path="$unix_path"
35653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35655    new_path="$unix_path"
35656  fi
35657
35658    fi
35659
35660    if test "x$new_path" = x; then
35661      # It's still not found. Now this is an unrecoverable error.
35662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35663$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35664      has_space=`$ECHO "$complete" | $GREP " "`
35665      if test "x$has_space" != x; then
35666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35668      fi
35669      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35670    fi
35671  fi
35672
35673  # Now new_path has a complete unix path to the binary
35674  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35675    # Keep paths in /bin as-is, but remove trailing .exe if any
35676    new_path="${new_path/%.exe/}"
35677    # Do not save /bin paths to all_fixpath_prefixes!
35678  else
35679    # Not in mixed or Windows style, start by that.
35680    new_path=`cmd //c echo $new_path`
35681
35682  input_path="$new_path"
35683  # Check if we need to convert this using DOS-style short mode. If the path
35684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35685  # take no chances and rewrite it.
35686  # Note: m4 eats our [], so we need to use [ and ] instead.
35687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35688  if test "x$has_forbidden_chars" != x; then
35689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35691  fi
35692
35693    # Output is in $new_path
35694
35695  windows_path="$new_path"
35696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35697    unix_path=`$CYGPATH -u "$windows_path"`
35698    new_path="$unix_path"
35699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35701    new_path="$unix_path"
35702  fi
35703
35704    # remove trailing .exe if any
35705    new_path="${new_path/%.exe/}"
35706
35707    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35708    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35709  fi
35710
35711    else
35712      # We're on a unix platform. Hooray! :)
35713      # First separate the path from the arguments. This will split at the first
35714      # space.
35715      complete="$CXX"
35716      path="${complete%% *}"
35717      tmp="$complete EOL"
35718      arguments="${tmp#* }"
35719
35720      # Cannot rely on the command "which" here since it doesn't always work.
35721      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35722      if test -z "$is_absolute_path"; then
35723        # Path to executable is not absolute. Find it.
35724        IFS_save="$IFS"
35725        IFS=:
35726        for p in $PATH; do
35727          if test -f "$p/$path" && test -x "$p/$path"; then
35728            new_path="$p/$path"
35729            break
35730          fi
35731        done
35732        IFS="$IFS_save"
35733      else
35734        # This is an absolute path, we can use it without further modifications.
35735        new_path="$path"
35736      fi
35737
35738      if test "x$new_path" = x; then
35739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35740$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35741        has_space=`$ECHO "$complete" | $GREP " "`
35742        if test "x$has_space" != x; then
35743          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35744$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35745        fi
35746        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35747      fi
35748    fi
35749
35750    # Now join together the path and the arguments once again
35751    if test "x$arguments" != xEOL; then
35752      new_complete="$new_path ${arguments% *}"
35753    else
35754      new_complete="$new_path"
35755    fi
35756
35757    if test "x$complete" != "x$new_complete"; then
35758      CXX="$new_complete"
35759      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35760$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35761    fi
35762  fi
35763
35764  TEST_COMPILER="$CXX"
35765
35766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35767$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35768  SYMLINK_ORIGINAL="$TEST_COMPILER"
35769
35770  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35771    # Follow a chain of symbolic links. Use readlink
35772    # where it exists, else fall back to horribly
35773    # complicated shell code.
35774    if test "x$READLINK_TESTED" != yes; then
35775      # On MacOSX there is a readlink tool with a different
35776      # purpose than the GNU readlink tool. Check the found readlink.
35777      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35778      if test "x$ISGNU" = x; then
35779        # A readlink that we do not know how to use.
35780        # Are there other non-GNU readlinks out there?
35781        READLINK_TESTED=yes
35782        READLINK=
35783      fi
35784    fi
35785
35786    if test "x$READLINK" != x; then
35787      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35788    else
35789      # Save the current directory for restoring afterwards
35790      STARTDIR=$PWD
35791      COUNTER=0
35792      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35793      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35794      cd $sym_link_dir
35795      # Use -P flag to resolve symlinks in directories.
35796      cd `$THEPWDCMD -P`
35797      sym_link_dir=`$THEPWDCMD -P`
35798      # Resolve file symlinks
35799      while test $COUNTER -lt 20; do
35800        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35801        if test "x$ISLINK" == x; then
35802          # This is not a symbolic link! We are done!
35803          break
35804        fi
35805        # Again resolve directory symlinks since the target of the just found
35806        # link could be in a different directory
35807        cd `$DIRNAME $ISLINK`
35808        sym_link_dir=`$THEPWDCMD -P`
35809        sym_link_file=`$BASENAME $ISLINK`
35810        let COUNTER=COUNTER+1
35811      done
35812      cd $STARTDIR
35813      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35814    fi
35815  fi
35816
35817  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35819$as_echo "no symlink" >&6; }
35820  else
35821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35822$as_echo "$SYMLINK_ORIGINAL" >&6; }
35823
35824    # We can't handle ccache by gcc wrappers, since we need to know if we're
35825    # using ccache. Instead ccache usage must be controlled by a configure option.
35826    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35827    if test "x$COMPILER_BASENAME" = "xccache"; then
35828      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35829$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35830      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35831    fi
35832  fi
35833
35834
35835  COMPILER=$CXX
35836  COMPILER_NAME=$COMPILER_NAME
35837
35838  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35839    # cc -V output typically looks like
35840    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35841    # or
35842    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35843    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35844    # Check that this is likely to be the Solaris Studio cc.
35845    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35846    if test $? -ne 0; then
35847      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35848      { $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
35849$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35850      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35851$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35852      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35853$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35854      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35855    fi
35856    # Remove usage instructions (if present), and
35857    # collapse compiler output into a single line
35858    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35859        $SED -e 's/ *[Uu]sage:.*//'`
35860    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35861        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35862  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35863    # xlc -qversion output typically looks like
35864    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35865    #     Version: 11.01.0000.0015
35866    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35867    # Check that this is likely to be the IBM XL C compiler.
35868    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35869    if test $? -ne 0; then
35870      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35871      { $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
35872$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35873      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35874$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35875      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35876$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35877      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35878    fi
35879    # Collapse compiler output into a single line
35880    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35881    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35882        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35883  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35884    # There is no specific version flag, but all output starts with a version string.
35885    # First line typically looks something like:
35886    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35887    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35888    # Check that this is likely to be Microsoft CL.EXE.
35889    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35890    if test $? -ne 0; then
35891      { $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
35892$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35893      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35894$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35895      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35896    fi
35897    # Collapse compiler output into a single line
35898    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35899    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35900        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35901  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35902    # gcc --version output typically looks like
35903    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35904    #     Copyright (C) 2013 Free Software Foundation, Inc.
35905    #     This is free software; see the source for copying conditions.  There is NO
35906    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35907    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35908    # Check that this is likely to be GCC.
35909    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35910    if test $? -ne 0; then
35911      { $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
35912$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35913      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35914$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35915      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35916    fi
35917    # Remove Copyright and legalese from version string, and
35918    # collapse into a single line
35919    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35920        $SED -e 's/ *Copyright .*//'`
35921    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35922        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35923  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35924    # clang --version output typically looks like
35925    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35926    #    clang version 3.3 (tags/RELEASE_33/final)
35927    # or
35928    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35929    #    Target: x86_64-pc-linux-gnu
35930    #    Thread model: posix
35931    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35932    # Check that this is likely to be clang
35933    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35934    if test $? -ne 0; then
35935      { $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
35936$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35937      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35938$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35939      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35940    fi
35941    # Collapse compiler output into a single line
35942    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35943    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35944        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35945  else
35946      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35947  fi
35948  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35949  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35950  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35951  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35952
35953  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35954$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35955
35956
35957  # Now that we have resolved CXX ourself, let autoconf have its go at it
35958  ac_ext=cpp
35959ac_cpp='$CXXCPP $CPPFLAGS'
35960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35963if test -z "$CXX"; then
35964  if test -n "$CCC"; then
35965    CXX=$CCC
35966  else
35967    if test -n "$ac_tool_prefix"; then
35968  for ac_prog in $CXX
35969  do
35970    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35971set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35973$as_echo_n "checking for $ac_word... " >&6; }
35974if ${ac_cv_prog_CXX+:} false; then :
35975  $as_echo_n "(cached) " >&6
35976else
35977  if test -n "$CXX"; then
35978  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35979else
35980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35981for as_dir in $PATH
35982do
35983  IFS=$as_save_IFS
35984  test -z "$as_dir" && as_dir=.
35985    for ac_exec_ext in '' $ac_executable_extensions; do
35986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35987    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35989    break 2
35990  fi
35991done
35992  done
35993IFS=$as_save_IFS
35994
35995fi
35996fi
35997CXX=$ac_cv_prog_CXX
35998if test -n "$CXX"; then
35999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36000$as_echo "$CXX" >&6; }
36001else
36002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36003$as_echo "no" >&6; }
36004fi
36005
36006
36007    test -n "$CXX" && break
36008  done
36009fi
36010if test -z "$CXX"; then
36011  ac_ct_CXX=$CXX
36012  for ac_prog in $CXX
36013do
36014  # Extract the first word of "$ac_prog", so it can be a program name with args.
36015set dummy $ac_prog; ac_word=$2
36016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36017$as_echo_n "checking for $ac_word... " >&6; }
36018if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36019  $as_echo_n "(cached) " >&6
36020else
36021  if test -n "$ac_ct_CXX"; then
36022  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36023else
36024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36025for as_dir in $PATH
36026do
36027  IFS=$as_save_IFS
36028  test -z "$as_dir" && as_dir=.
36029    for ac_exec_ext in '' $ac_executable_extensions; do
36030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36031    ac_cv_prog_ac_ct_CXX="$ac_prog"
36032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36033    break 2
36034  fi
36035done
36036  done
36037IFS=$as_save_IFS
36038
36039fi
36040fi
36041ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36042if test -n "$ac_ct_CXX"; then
36043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36044$as_echo "$ac_ct_CXX" >&6; }
36045else
36046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36047$as_echo "no" >&6; }
36048fi
36049
36050
36051  test -n "$ac_ct_CXX" && break
36052done
36053
36054  if test "x$ac_ct_CXX" = x; then
36055    CXX="g++"
36056  else
36057    case $cross_compiling:$ac_tool_warned in
36058yes:)
36059{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36060$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36061ac_tool_warned=yes ;;
36062esac
36063    CXX=$ac_ct_CXX
36064  fi
36065fi
36066
36067  fi
36068fi
36069# Provide some information about the compiler.
36070$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36071set X $ac_compile
36072ac_compiler=$2
36073for ac_option in --version -v -V -qversion; do
36074  { { ac_try="$ac_compiler $ac_option >&5"
36075case "(($ac_try" in
36076  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36077  *) ac_try_echo=$ac_try;;
36078esac
36079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36080$as_echo "$ac_try_echo"; } >&5
36081  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36082  ac_status=$?
36083  if test -s conftest.err; then
36084    sed '10a\
36085... rest of stderr output deleted ...
36086         10q' conftest.err >conftest.er1
36087    cat conftest.er1 >&5
36088  fi
36089  rm -f conftest.er1 conftest.err
36090  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36091  test $ac_status = 0; }
36092done
36093
36094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36095$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36096if ${ac_cv_cxx_compiler_gnu+:} false; then :
36097  $as_echo_n "(cached) " >&6
36098else
36099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36100/* end confdefs.h.  */
36101
36102int
36103main ()
36104{
36105#ifndef __GNUC__
36106       choke me
36107#endif
36108
36109  ;
36110  return 0;
36111}
36112_ACEOF
36113if ac_fn_cxx_try_compile "$LINENO"; then :
36114  ac_compiler_gnu=yes
36115else
36116  ac_compiler_gnu=no
36117fi
36118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36119ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36120
36121fi
36122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36123$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36124if test $ac_compiler_gnu = yes; then
36125  GXX=yes
36126else
36127  GXX=
36128fi
36129ac_test_CXXFLAGS=${CXXFLAGS+set}
36130ac_save_CXXFLAGS=$CXXFLAGS
36131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36132$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36133if ${ac_cv_prog_cxx_g+:} false; then :
36134  $as_echo_n "(cached) " >&6
36135else
36136  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36137   ac_cxx_werror_flag=yes
36138   ac_cv_prog_cxx_g=no
36139   CXXFLAGS="-g"
36140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36141/* end confdefs.h.  */
36142
36143int
36144main ()
36145{
36146
36147  ;
36148  return 0;
36149}
36150_ACEOF
36151if ac_fn_cxx_try_compile "$LINENO"; then :
36152  ac_cv_prog_cxx_g=yes
36153else
36154  CXXFLAGS=""
36155      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36156/* end confdefs.h.  */
36157
36158int
36159main ()
36160{
36161
36162  ;
36163  return 0;
36164}
36165_ACEOF
36166if ac_fn_cxx_try_compile "$LINENO"; then :
36167
36168else
36169  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36170	 CXXFLAGS="-g"
36171	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36172/* end confdefs.h.  */
36173
36174int
36175main ()
36176{
36177
36178  ;
36179  return 0;
36180}
36181_ACEOF
36182if ac_fn_cxx_try_compile "$LINENO"; then :
36183  ac_cv_prog_cxx_g=yes
36184fi
36185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36186fi
36187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36188fi
36189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36190   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36191fi
36192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36193$as_echo "$ac_cv_prog_cxx_g" >&6; }
36194if test "$ac_test_CXXFLAGS" = set; then
36195  CXXFLAGS=$ac_save_CXXFLAGS
36196elif test $ac_cv_prog_cxx_g = yes; then
36197  if test "$GXX" = yes; then
36198    CXXFLAGS="-g -O2"
36199  else
36200    CXXFLAGS="-g"
36201  fi
36202else
36203  if test "$GXX" = yes; then
36204    CXXFLAGS="-O2"
36205  else
36206    CXXFLAGS=
36207  fi
36208fi
36209ac_ext=cpp
36210ac_cpp='$CXXCPP $CPPFLAGS'
36211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36214
36215
36216  # This is the compiler version number on the form X.Y[.Z]
36217
36218
36219
36220
36221  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36222    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36223$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36224    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36225$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36226  fi
36227
36228  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36229  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36230    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36231$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36232  fi
36233
36234  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36235    { $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
36236$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36237  fi
36238
36239  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36240
36241
36242  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290
36291
36292    # Execute function body
36293
36294  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36295  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36296
36297  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36298    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36299  fi
36300
36301  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36302    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36303  fi
36304
36305  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36306  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36307
36308  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36309    :
36310
36311  else
36312    :
36313
36314          { $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
36315$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36316
36317
36318  fi
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331
36332
36333  fi
36334
36335  #
36336  # Setup the preprocessor (CPP and CXXCPP)
36337  #
36338  ac_ext=c
36339ac_cpp='$CPP $CPPFLAGS'
36340ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36341ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36342ac_compiler_gnu=$ac_cv_c_compiler_gnu
36343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36344$as_echo_n "checking how to run the C preprocessor... " >&6; }
36345# On Suns, sometimes $CPP names a directory.
36346if test -n "$CPP" && test -d "$CPP"; then
36347  CPP=
36348fi
36349if test -z "$CPP"; then
36350  if ${ac_cv_prog_CPP+:} false; then :
36351  $as_echo_n "(cached) " >&6
36352else
36353      # Double quotes because CPP needs to be expanded
36354    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36355    do
36356      ac_preproc_ok=false
36357for ac_c_preproc_warn_flag in '' yes
36358do
36359  # Use a header file that comes with gcc, so configuring glibc
36360  # with a fresh cross-compiler works.
36361  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36362  # <limits.h> exists even on freestanding compilers.
36363  # On the NeXT, cc -E runs the code through the compiler's parser,
36364  # not just through cpp. "Syntax error" is here to catch this case.
36365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36366/* end confdefs.h.  */
36367#ifdef __STDC__
36368# include <limits.h>
36369#else
36370# include <assert.h>
36371#endif
36372		     Syntax error
36373_ACEOF
36374if ac_fn_c_try_cpp "$LINENO"; then :
36375
36376else
36377  # Broken: fails on valid input.
36378continue
36379fi
36380rm -f conftest.err conftest.i conftest.$ac_ext
36381
36382  # OK, works on sane cases.  Now check whether nonexistent headers
36383  # can be detected and how.
36384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36385/* end confdefs.h.  */
36386#include <ac_nonexistent.h>
36387_ACEOF
36388if ac_fn_c_try_cpp "$LINENO"; then :
36389  # Broken: success on invalid input.
36390continue
36391else
36392  # Passes both tests.
36393ac_preproc_ok=:
36394break
36395fi
36396rm -f conftest.err conftest.i conftest.$ac_ext
36397
36398done
36399# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36400rm -f conftest.i conftest.err conftest.$ac_ext
36401if $ac_preproc_ok; then :
36402  break
36403fi
36404
36405    done
36406    ac_cv_prog_CPP=$CPP
36407
36408fi
36409  CPP=$ac_cv_prog_CPP
36410else
36411  ac_cv_prog_CPP=$CPP
36412fi
36413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36414$as_echo "$CPP" >&6; }
36415ac_preproc_ok=false
36416for ac_c_preproc_warn_flag in '' yes
36417do
36418  # Use a header file that comes with gcc, so configuring glibc
36419  # with a fresh cross-compiler works.
36420  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36421  # <limits.h> exists even on freestanding compilers.
36422  # On the NeXT, cc -E runs the code through the compiler's parser,
36423  # not just through cpp. "Syntax error" is here to catch this case.
36424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36425/* end confdefs.h.  */
36426#ifdef __STDC__
36427# include <limits.h>
36428#else
36429# include <assert.h>
36430#endif
36431		     Syntax error
36432_ACEOF
36433if ac_fn_c_try_cpp "$LINENO"; then :
36434
36435else
36436  # Broken: fails on valid input.
36437continue
36438fi
36439rm -f conftest.err conftest.i conftest.$ac_ext
36440
36441  # OK, works on sane cases.  Now check whether nonexistent headers
36442  # can be detected and how.
36443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36444/* end confdefs.h.  */
36445#include <ac_nonexistent.h>
36446_ACEOF
36447if ac_fn_c_try_cpp "$LINENO"; then :
36448  # Broken: success on invalid input.
36449continue
36450else
36451  # Passes both tests.
36452ac_preproc_ok=:
36453break
36454fi
36455rm -f conftest.err conftest.i conftest.$ac_ext
36456
36457done
36458# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36459rm -f conftest.i conftest.err conftest.$ac_ext
36460if $ac_preproc_ok; then :
36461
36462else
36463  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36465as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36466See \`config.log' for more details" "$LINENO" 5; }
36467fi
36468
36469ac_ext=cpp
36470ac_cpp='$CXXCPP $CPPFLAGS'
36471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36474
36475
36476  # Only process if variable expands to non-empty
36477
36478  if test "x$CPP" != x; then
36479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36480
36481  # First separate the path from the arguments. This will split at the first
36482  # space.
36483  complete="$CPP"
36484  path="${complete%% *}"
36485  tmp="$complete EOL"
36486  arguments="${tmp#* }"
36487
36488  # Input might be given as Windows format, start by converting to
36489  # unix format.
36490  new_path=`$CYGPATH -u "$path"`
36491
36492  # Now try to locate executable using which
36493  new_path=`$WHICH "$new_path" 2> /dev/null`
36494  # bat and cmd files are not always considered executable in cygwin causing which
36495  # to not find them
36496  if test "x$new_path" = x \
36497      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36498      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36499    new_path=`$CYGPATH -u "$path"`
36500  fi
36501  if test "x$new_path" = x; then
36502    # Oops. Which didn't find the executable.
36503    # The splitting of arguments from the executable at a space might have been incorrect,
36504    # since paths with space are more likely in Windows. Give it another try with the whole
36505    # argument.
36506    path="$complete"
36507    arguments="EOL"
36508    new_path=`$CYGPATH -u "$path"`
36509    new_path=`$WHICH "$new_path" 2> /dev/null`
36510    # bat and cmd files are not always considered executable in cygwin causing which
36511    # to not find them
36512    if test "x$new_path" = x \
36513        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36514        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36515      new_path=`$CYGPATH -u "$path"`
36516    fi
36517    if test "x$new_path" = x; then
36518      # It's still not found. Now this is an unrecoverable error.
36519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36520$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36521      has_space=`$ECHO "$complete" | $GREP " "`
36522      if test "x$has_space" != x; then
36523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36525      fi
36526      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36527    fi
36528  fi
36529
36530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36533  # "foo.exe" is OK but "foo" is an error.
36534  #
36535  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36536  # It is also a way to make sure we got the proper file name for the real test later on.
36537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36538  if test "x$test_shortpath" = x; then
36539    # Short path failed, file does not exist as specified.
36540    # Try adding .exe or .cmd
36541    if test -f "${new_path}.exe"; then
36542      input_to_shortpath="${new_path}.exe"
36543    elif test -f "${new_path}.cmd"; then
36544      input_to_shortpath="${new_path}.cmd"
36545    else
36546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36547$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36548      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36549$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36550      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36551    fi
36552  else
36553    input_to_shortpath="$new_path"
36554  fi
36555
36556  # Call helper function which possibly converts this using DOS-style short mode.
36557  # If so, the updated path is stored in $new_path.
36558  new_path="$input_to_shortpath"
36559
36560  input_path="$input_to_shortpath"
36561  # Check if we need to convert this using DOS-style short mode. If the path
36562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36563  # take no chances and rewrite it.
36564  # Note: m4 eats our [], so we need to use [ and ] instead.
36565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36566  if test "x$has_forbidden_chars" != x; then
36567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36571      # Going to short mode and back again did indeed matter. Since short mode is
36572      # case insensitive, let's make it lowercase to improve readability.
36573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36574      # Now convert it back to Unix-style (cygpath)
36575      input_path=`$CYGPATH -u "$shortmode_path"`
36576      new_path="$input_path"
36577    fi
36578  fi
36579
36580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36581  if test "x$test_cygdrive_prefix" = x; then
36582    # As a simple fix, exclude /usr/bin since it's not a real path.
36583    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36585      # a path prefixed by /cygdrive for fixpath to work.
36586      new_path="$CYGWIN_ROOT_PATH$input_path"
36587    fi
36588  fi
36589
36590  # remove trailing .exe if any
36591  new_path="${new_path/%.exe/}"
36592
36593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36594
36595  # First separate the path from the arguments. This will split at the first
36596  # space.
36597  complete="$CPP"
36598  path="${complete%% *}"
36599  tmp="$complete EOL"
36600  arguments="${tmp#* }"
36601
36602  # Input might be given as Windows format, start by converting to
36603  # unix format.
36604  new_path="$path"
36605
36606  windows_path="$new_path"
36607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36608    unix_path=`$CYGPATH -u "$windows_path"`
36609    new_path="$unix_path"
36610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36612    new_path="$unix_path"
36613  fi
36614
36615
36616  # Now try to locate executable using which
36617  new_path=`$WHICH "$new_path" 2> /dev/null`
36618
36619  if test "x$new_path" = x; then
36620    # Oops. Which didn't find the executable.
36621    # The splitting of arguments from the executable at a space might have been incorrect,
36622    # since paths with space are more likely in Windows. Give it another try with the whole
36623    # argument.
36624    path="$complete"
36625    arguments="EOL"
36626    new_path="$path"
36627
36628  windows_path="$new_path"
36629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36630    unix_path=`$CYGPATH -u "$windows_path"`
36631    new_path="$unix_path"
36632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36634    new_path="$unix_path"
36635  fi
36636
36637
36638    new_path=`$WHICH "$new_path" 2> /dev/null`
36639    # bat and cmd files are not always considered executable in MSYS causing which
36640    # to not find them
36641    if test "x$new_path" = x \
36642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36644      new_path="$path"
36645
36646  windows_path="$new_path"
36647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36648    unix_path=`$CYGPATH -u "$windows_path"`
36649    new_path="$unix_path"
36650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36652    new_path="$unix_path"
36653  fi
36654
36655    fi
36656
36657    if test "x$new_path" = x; then
36658      # It's still not found. Now this is an unrecoverable error.
36659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36660$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36661      has_space=`$ECHO "$complete" | $GREP " "`
36662      if test "x$has_space" != x; then
36663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36665      fi
36666      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36667    fi
36668  fi
36669
36670  # Now new_path has a complete unix path to the binary
36671  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36672    # Keep paths in /bin as-is, but remove trailing .exe if any
36673    new_path="${new_path/%.exe/}"
36674    # Do not save /bin paths to all_fixpath_prefixes!
36675  else
36676    # Not in mixed or Windows style, start by that.
36677    new_path=`cmd //c echo $new_path`
36678
36679  input_path="$new_path"
36680  # Check if we need to convert this using DOS-style short mode. If the path
36681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36682  # take no chances and rewrite it.
36683  # Note: m4 eats our [], so we need to use [ and ] instead.
36684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36685  if test "x$has_forbidden_chars" != x; then
36686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36688  fi
36689
36690    # Output is in $new_path
36691
36692  windows_path="$new_path"
36693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36694    unix_path=`$CYGPATH -u "$windows_path"`
36695    new_path="$unix_path"
36696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36698    new_path="$unix_path"
36699  fi
36700
36701    # remove trailing .exe if any
36702    new_path="${new_path/%.exe/}"
36703
36704    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36705    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36706  fi
36707
36708    else
36709      # We're on a unix platform. Hooray! :)
36710      # First separate the path from the arguments. This will split at the first
36711      # space.
36712      complete="$CPP"
36713      path="${complete%% *}"
36714      tmp="$complete EOL"
36715      arguments="${tmp#* }"
36716
36717      # Cannot rely on the command "which" here since it doesn't always work.
36718      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36719      if test -z "$is_absolute_path"; then
36720        # Path to executable is not absolute. Find it.
36721        IFS_save="$IFS"
36722        IFS=:
36723        for p in $PATH; do
36724          if test -f "$p/$path" && test -x "$p/$path"; then
36725            new_path="$p/$path"
36726            break
36727          fi
36728        done
36729        IFS="$IFS_save"
36730      else
36731        # This is an absolute path, we can use it without further modifications.
36732        new_path="$path"
36733      fi
36734
36735      if test "x$new_path" = x; then
36736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36737$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36738        has_space=`$ECHO "$complete" | $GREP " "`
36739        if test "x$has_space" != x; then
36740          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36741$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36742        fi
36743        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36744      fi
36745    fi
36746
36747    # Now join together the path and the arguments once again
36748    if test "x$arguments" != xEOL; then
36749      new_complete="$new_path ${arguments% *}"
36750    else
36751      new_complete="$new_path"
36752    fi
36753
36754    if test "x$complete" != "x$new_complete"; then
36755      CPP="$new_complete"
36756      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36757$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36758    fi
36759  fi
36760
36761  ac_ext=cpp
36762ac_cpp='$CXXCPP $CPPFLAGS'
36763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36767$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36768if test -z "$CXXCPP"; then
36769  if ${ac_cv_prog_CXXCPP+:} false; then :
36770  $as_echo_n "(cached) " >&6
36771else
36772      # Double quotes because CXXCPP needs to be expanded
36773    for CXXCPP in "$CXX -E" "/lib/cpp"
36774    do
36775      ac_preproc_ok=false
36776for ac_cxx_preproc_warn_flag in '' yes
36777do
36778  # Use a header file that comes with gcc, so configuring glibc
36779  # with a fresh cross-compiler works.
36780  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36781  # <limits.h> exists even on freestanding compilers.
36782  # On the NeXT, cc -E runs the code through the compiler's parser,
36783  # not just through cpp. "Syntax error" is here to catch this case.
36784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36785/* end confdefs.h.  */
36786#ifdef __STDC__
36787# include <limits.h>
36788#else
36789# include <assert.h>
36790#endif
36791		     Syntax error
36792_ACEOF
36793if ac_fn_cxx_try_cpp "$LINENO"; then :
36794
36795else
36796  # Broken: fails on valid input.
36797continue
36798fi
36799rm -f conftest.err conftest.i conftest.$ac_ext
36800
36801  # OK, works on sane cases.  Now check whether nonexistent headers
36802  # can be detected and how.
36803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36804/* end confdefs.h.  */
36805#include <ac_nonexistent.h>
36806_ACEOF
36807if ac_fn_cxx_try_cpp "$LINENO"; then :
36808  # Broken: success on invalid input.
36809continue
36810else
36811  # Passes both tests.
36812ac_preproc_ok=:
36813break
36814fi
36815rm -f conftest.err conftest.i conftest.$ac_ext
36816
36817done
36818# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36819rm -f conftest.i conftest.err conftest.$ac_ext
36820if $ac_preproc_ok; then :
36821  break
36822fi
36823
36824    done
36825    ac_cv_prog_CXXCPP=$CXXCPP
36826
36827fi
36828  CXXCPP=$ac_cv_prog_CXXCPP
36829else
36830  ac_cv_prog_CXXCPP=$CXXCPP
36831fi
36832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36833$as_echo "$CXXCPP" >&6; }
36834ac_preproc_ok=false
36835for ac_cxx_preproc_warn_flag in '' yes
36836do
36837  # Use a header file that comes with gcc, so configuring glibc
36838  # with a fresh cross-compiler works.
36839  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36840  # <limits.h> exists even on freestanding compilers.
36841  # On the NeXT, cc -E runs the code through the compiler's parser,
36842  # not just through cpp. "Syntax error" is here to catch this case.
36843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36844/* end confdefs.h.  */
36845#ifdef __STDC__
36846# include <limits.h>
36847#else
36848# include <assert.h>
36849#endif
36850		     Syntax error
36851_ACEOF
36852if ac_fn_cxx_try_cpp "$LINENO"; then :
36853
36854else
36855  # Broken: fails on valid input.
36856continue
36857fi
36858rm -f conftest.err conftest.i conftest.$ac_ext
36859
36860  # OK, works on sane cases.  Now check whether nonexistent headers
36861  # can be detected and how.
36862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36863/* end confdefs.h.  */
36864#include <ac_nonexistent.h>
36865_ACEOF
36866if ac_fn_cxx_try_cpp "$LINENO"; then :
36867  # Broken: success on invalid input.
36868continue
36869else
36870  # Passes both tests.
36871ac_preproc_ok=:
36872break
36873fi
36874rm -f conftest.err conftest.i conftest.$ac_ext
36875
36876done
36877# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36878rm -f conftest.i conftest.err conftest.$ac_ext
36879if $ac_preproc_ok; then :
36880
36881else
36882  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36884as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36885See \`config.log' for more details" "$LINENO" 5; }
36886fi
36887
36888ac_ext=cpp
36889ac_cpp='$CXXCPP $CPPFLAGS'
36890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36893
36894
36895  # Only process if variable expands to non-empty
36896
36897  if test "x$CXXCPP" != x; then
36898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36899
36900  # First separate the path from the arguments. This will split at the first
36901  # space.
36902  complete="$CXXCPP"
36903  path="${complete%% *}"
36904  tmp="$complete EOL"
36905  arguments="${tmp#* }"
36906
36907  # Input might be given as Windows format, start by converting to
36908  # unix format.
36909  new_path=`$CYGPATH -u "$path"`
36910
36911  # Now try to locate executable using which
36912  new_path=`$WHICH "$new_path" 2> /dev/null`
36913  # bat and cmd files are not always considered executable in cygwin causing which
36914  # to not find them
36915  if test "x$new_path" = x \
36916      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36917      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36918    new_path=`$CYGPATH -u "$path"`
36919  fi
36920  if test "x$new_path" = x; then
36921    # Oops. Which didn't find the executable.
36922    # The splitting of arguments from the executable at a space might have been incorrect,
36923    # since paths with space are more likely in Windows. Give it another try with the whole
36924    # argument.
36925    path="$complete"
36926    arguments="EOL"
36927    new_path=`$CYGPATH -u "$path"`
36928    new_path=`$WHICH "$new_path" 2> /dev/null`
36929    # bat and cmd files are not always considered executable in cygwin causing which
36930    # to not find them
36931    if test "x$new_path" = x \
36932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36934      new_path=`$CYGPATH -u "$path"`
36935    fi
36936    if test "x$new_path" = x; then
36937      # It's still not found. Now this is an unrecoverable error.
36938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36939$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36940      has_space=`$ECHO "$complete" | $GREP " "`
36941      if test "x$has_space" != x; then
36942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36944      fi
36945      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36946    fi
36947  fi
36948
36949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36952  # "foo.exe" is OK but "foo" is an error.
36953  #
36954  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36955  # It is also a way to make sure we got the proper file name for the real test later on.
36956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36957  if test "x$test_shortpath" = x; then
36958    # Short path failed, file does not exist as specified.
36959    # Try adding .exe or .cmd
36960    if test -f "${new_path}.exe"; then
36961      input_to_shortpath="${new_path}.exe"
36962    elif test -f "${new_path}.cmd"; then
36963      input_to_shortpath="${new_path}.cmd"
36964    else
36965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36966$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36969      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36970    fi
36971  else
36972    input_to_shortpath="$new_path"
36973  fi
36974
36975  # Call helper function which possibly converts this using DOS-style short mode.
36976  # If so, the updated path is stored in $new_path.
36977  new_path="$input_to_shortpath"
36978
36979  input_path="$input_to_shortpath"
36980  # Check if we need to convert this using DOS-style short mode. If the path
36981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36982  # take no chances and rewrite it.
36983  # Note: m4 eats our [], so we need to use [ and ] instead.
36984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36985  if test "x$has_forbidden_chars" != x; then
36986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36990      # Going to short mode and back again did indeed matter. Since short mode is
36991      # case insensitive, let's make it lowercase to improve readability.
36992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36993      # Now convert it back to Unix-style (cygpath)
36994      input_path=`$CYGPATH -u "$shortmode_path"`
36995      new_path="$input_path"
36996    fi
36997  fi
36998
36999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37000  if test "x$test_cygdrive_prefix" = x; then
37001    # As a simple fix, exclude /usr/bin since it's not a real path.
37002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37004      # a path prefixed by /cygdrive for fixpath to work.
37005      new_path="$CYGWIN_ROOT_PATH$input_path"
37006    fi
37007  fi
37008
37009  # remove trailing .exe if any
37010  new_path="${new_path/%.exe/}"
37011
37012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37013
37014  # First separate the path from the arguments. This will split at the first
37015  # space.
37016  complete="$CXXCPP"
37017  path="${complete%% *}"
37018  tmp="$complete EOL"
37019  arguments="${tmp#* }"
37020
37021  # Input might be given as Windows format, start by converting to
37022  # unix format.
37023  new_path="$path"
37024
37025  windows_path="$new_path"
37026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37027    unix_path=`$CYGPATH -u "$windows_path"`
37028    new_path="$unix_path"
37029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37031    new_path="$unix_path"
37032  fi
37033
37034
37035  # Now try to locate executable using which
37036  new_path=`$WHICH "$new_path" 2> /dev/null`
37037
37038  if test "x$new_path" = x; then
37039    # Oops. Which didn't find the executable.
37040    # The splitting of arguments from the executable at a space might have been incorrect,
37041    # since paths with space are more likely in Windows. Give it another try with the whole
37042    # argument.
37043    path="$complete"
37044    arguments="EOL"
37045    new_path="$path"
37046
37047  windows_path="$new_path"
37048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37049    unix_path=`$CYGPATH -u "$windows_path"`
37050    new_path="$unix_path"
37051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37053    new_path="$unix_path"
37054  fi
37055
37056
37057    new_path=`$WHICH "$new_path" 2> /dev/null`
37058    # bat and cmd files are not always considered executable in MSYS causing which
37059    # to not find them
37060    if test "x$new_path" = x \
37061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37063      new_path="$path"
37064
37065  windows_path="$new_path"
37066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37067    unix_path=`$CYGPATH -u "$windows_path"`
37068    new_path="$unix_path"
37069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37071    new_path="$unix_path"
37072  fi
37073
37074    fi
37075
37076    if test "x$new_path" = x; then
37077      # It's still not found. Now this is an unrecoverable error.
37078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37079$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37080      has_space=`$ECHO "$complete" | $GREP " "`
37081      if test "x$has_space" != x; then
37082        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37083$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37084      fi
37085      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37086    fi
37087  fi
37088
37089  # Now new_path has a complete unix path to the binary
37090  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37091    # Keep paths in /bin as-is, but remove trailing .exe if any
37092    new_path="${new_path/%.exe/}"
37093    # Do not save /bin paths to all_fixpath_prefixes!
37094  else
37095    # Not in mixed or Windows style, start by that.
37096    new_path=`cmd //c echo $new_path`
37097
37098  input_path="$new_path"
37099  # Check if we need to convert this using DOS-style short mode. If the path
37100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37101  # take no chances and rewrite it.
37102  # Note: m4 eats our [], so we need to use [ and ] instead.
37103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37104  if test "x$has_forbidden_chars" != x; then
37105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37107  fi
37108
37109    # Output is in $new_path
37110
37111  windows_path="$new_path"
37112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37113    unix_path=`$CYGPATH -u "$windows_path"`
37114    new_path="$unix_path"
37115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37117    new_path="$unix_path"
37118  fi
37119
37120    # remove trailing .exe if any
37121    new_path="${new_path/%.exe/}"
37122
37123    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37124    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37125  fi
37126
37127    else
37128      # We're on a unix platform. Hooray! :)
37129      # First separate the path from the arguments. This will split at the first
37130      # space.
37131      complete="$CXXCPP"
37132      path="${complete%% *}"
37133      tmp="$complete EOL"
37134      arguments="${tmp#* }"
37135
37136      # Cannot rely on the command "which" here since it doesn't always work.
37137      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37138      if test -z "$is_absolute_path"; then
37139        # Path to executable is not absolute. Find it.
37140        IFS_save="$IFS"
37141        IFS=:
37142        for p in $PATH; do
37143          if test -f "$p/$path" && test -x "$p/$path"; then
37144            new_path="$p/$path"
37145            break
37146          fi
37147        done
37148        IFS="$IFS_save"
37149      else
37150        # This is an absolute path, we can use it without further modifications.
37151        new_path="$path"
37152      fi
37153
37154      if test "x$new_path" = x; then
37155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37156$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37157        has_space=`$ECHO "$complete" | $GREP " "`
37158        if test "x$has_space" != x; then
37159          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37161        fi
37162        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37163      fi
37164    fi
37165
37166    # Now join together the path and the arguments once again
37167    if test "x$arguments" != xEOL; then
37168      new_complete="$new_path ${arguments% *}"
37169    else
37170      new_complete="$new_path"
37171    fi
37172
37173    if test "x$complete" != "x$new_complete"; then
37174      CXXCPP="$new_complete"
37175      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37176$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37177    fi
37178  fi
37179
37180
37181  #
37182  # Setup the linker (LD)
37183  #
37184  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37185    # In the Microsoft toolchain we have a separate LD command "link".
37186    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37187    # a cygwin program for something completely different.
37188    # Extract the first word of "link", so it can be a program name with args.
37189set dummy link; ac_word=$2
37190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37191$as_echo_n "checking for $ac_word... " >&6; }
37192if ${ac_cv_prog_LD+:} false; then :
37193  $as_echo_n "(cached) " >&6
37194else
37195  if test -n "$LD"; then
37196  ac_cv_prog_LD="$LD" # Let the user override the test.
37197else
37198  ac_prog_rejected=no
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    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37207       ac_prog_rejected=yes
37208       continue
37209     fi
37210    ac_cv_prog_LD="link"
37211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37212    break 2
37213  fi
37214done
37215  done
37216IFS=$as_save_IFS
37217
37218if test $ac_prog_rejected = yes; then
37219  # We found a bogon in the path, so make sure we never use it.
37220  set dummy $ac_cv_prog_LD
37221  shift
37222  if test $# != 0; then
37223    # We chose a different compiler from the bogus one.
37224    # However, it has the same basename, so the bogon will be chosen
37225    # first if we set LD to just the basename; use the full file name.
37226    shift
37227    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37228  fi
37229fi
37230fi
37231fi
37232LD=$ac_cv_prog_LD
37233if test -n "$LD"; then
37234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37235$as_echo "$LD" >&6; }
37236else
37237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37238$as_echo "no" >&6; }
37239fi
37240
37241
37242
37243  # Only process if variable expands to non-empty
37244
37245  if test "x$LD" != x; then
37246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37247
37248  # First separate the path from the arguments. This will split at the first
37249  # space.
37250  complete="$LD"
37251  path="${complete%% *}"
37252  tmp="$complete EOL"
37253  arguments="${tmp#* }"
37254
37255  # Input might be given as Windows format, start by converting to
37256  # unix format.
37257  new_path=`$CYGPATH -u "$path"`
37258
37259  # Now try to locate executable using which
37260  new_path=`$WHICH "$new_path" 2> /dev/null`
37261  # bat and cmd files are not always considered executable in cygwin causing which
37262  # to not find them
37263  if test "x$new_path" = x \
37264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37266    new_path=`$CYGPATH -u "$path"`
37267  fi
37268  if test "x$new_path" = x; then
37269    # Oops. Which didn't find the executable.
37270    # The splitting of arguments from the executable at a space might have been incorrect,
37271    # since paths with space are more likely in Windows. Give it another try with the whole
37272    # argument.
37273    path="$complete"
37274    arguments="EOL"
37275    new_path=`$CYGPATH -u "$path"`
37276    new_path=`$WHICH "$new_path" 2> /dev/null`
37277    # bat and cmd files are not always considered executable in cygwin causing which
37278    # to not find them
37279    if test "x$new_path" = x \
37280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37282      new_path=`$CYGPATH -u "$path"`
37283    fi
37284    if test "x$new_path" = x; then
37285      # It's still not found. Now this is an unrecoverable error.
37286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37287$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37288      has_space=`$ECHO "$complete" | $GREP " "`
37289      if test "x$has_space" != x; then
37290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37292      fi
37293      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37294    fi
37295  fi
37296
37297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37300  # "foo.exe" is OK but "foo" is an error.
37301  #
37302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37303  # It is also a way to make sure we got the proper file name for the real test later on.
37304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37305  if test "x$test_shortpath" = x; then
37306    # Short path failed, file does not exist as specified.
37307    # Try adding .exe or .cmd
37308    if test -f "${new_path}.exe"; then
37309      input_to_shortpath="${new_path}.exe"
37310    elif test -f "${new_path}.cmd"; then
37311      input_to_shortpath="${new_path}.cmd"
37312    else
37313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37314$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37317      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37318    fi
37319  else
37320    input_to_shortpath="$new_path"
37321  fi
37322
37323  # Call helper function which possibly converts this using DOS-style short mode.
37324  # If so, the updated path is stored in $new_path.
37325  new_path="$input_to_shortpath"
37326
37327  input_path="$input_to_shortpath"
37328  # Check if we need to convert this using DOS-style short mode. If the path
37329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37330  # take no chances and rewrite it.
37331  # Note: m4 eats our [], so we need to use [ and ] instead.
37332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37333  if test "x$has_forbidden_chars" != x; then
37334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37338      # Going to short mode and back again did indeed matter. Since short mode is
37339      # case insensitive, let's make it lowercase to improve readability.
37340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37341      # Now convert it back to Unix-style (cygpath)
37342      input_path=`$CYGPATH -u "$shortmode_path"`
37343      new_path="$input_path"
37344    fi
37345  fi
37346
37347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37348  if test "x$test_cygdrive_prefix" = x; then
37349    # As a simple fix, exclude /usr/bin since it's not a real path.
37350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37352      # a path prefixed by /cygdrive for fixpath to work.
37353      new_path="$CYGWIN_ROOT_PATH$input_path"
37354    fi
37355  fi
37356
37357  # remove trailing .exe if any
37358  new_path="${new_path/%.exe/}"
37359
37360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37361
37362  # First separate the path from the arguments. This will split at the first
37363  # space.
37364  complete="$LD"
37365  path="${complete%% *}"
37366  tmp="$complete EOL"
37367  arguments="${tmp#* }"
37368
37369  # Input might be given as Windows format, start by converting to
37370  # unix format.
37371  new_path="$path"
37372
37373  windows_path="$new_path"
37374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37375    unix_path=`$CYGPATH -u "$windows_path"`
37376    new_path="$unix_path"
37377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37379    new_path="$unix_path"
37380  fi
37381
37382
37383  # Now try to locate executable using which
37384  new_path=`$WHICH "$new_path" 2> /dev/null`
37385
37386  if test "x$new_path" = x; then
37387    # Oops. Which didn't find the executable.
37388    # The splitting of arguments from the executable at a space might have been incorrect,
37389    # since paths with space are more likely in Windows. Give it another try with the whole
37390    # argument.
37391    path="$complete"
37392    arguments="EOL"
37393    new_path="$path"
37394
37395  windows_path="$new_path"
37396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37397    unix_path=`$CYGPATH -u "$windows_path"`
37398    new_path="$unix_path"
37399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37401    new_path="$unix_path"
37402  fi
37403
37404
37405    new_path=`$WHICH "$new_path" 2> /dev/null`
37406    # bat and cmd files are not always considered executable in MSYS causing which
37407    # to not find them
37408    if test "x$new_path" = x \
37409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37411      new_path="$path"
37412
37413  windows_path="$new_path"
37414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37415    unix_path=`$CYGPATH -u "$windows_path"`
37416    new_path="$unix_path"
37417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37419    new_path="$unix_path"
37420  fi
37421
37422    fi
37423
37424    if test "x$new_path" = x; then
37425      # It's still not found. Now this is an unrecoverable error.
37426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37427$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37428      has_space=`$ECHO "$complete" | $GREP " "`
37429      if test "x$has_space" != x; then
37430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37432      fi
37433      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37434    fi
37435  fi
37436
37437  # Now new_path has a complete unix path to the binary
37438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37439    # Keep paths in /bin as-is, but remove trailing .exe if any
37440    new_path="${new_path/%.exe/}"
37441    # Do not save /bin paths to all_fixpath_prefixes!
37442  else
37443    # Not in mixed or Windows style, start by that.
37444    new_path=`cmd //c echo $new_path`
37445
37446  input_path="$new_path"
37447  # Check if we need to convert this using DOS-style short mode. If the path
37448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37449  # take no chances and rewrite it.
37450  # Note: m4 eats our [], so we need to use [ and ] instead.
37451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37452  if test "x$has_forbidden_chars" != x; then
37453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37455  fi
37456
37457    # Output is in $new_path
37458
37459  windows_path="$new_path"
37460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37461    unix_path=`$CYGPATH -u "$windows_path"`
37462    new_path="$unix_path"
37463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37465    new_path="$unix_path"
37466  fi
37467
37468    # remove trailing .exe if any
37469    new_path="${new_path/%.exe/}"
37470
37471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37473  fi
37474
37475    else
37476      # We're on a unix platform. Hooray! :)
37477      # First separate the path from the arguments. This will split at the first
37478      # space.
37479      complete="$LD"
37480      path="${complete%% *}"
37481      tmp="$complete EOL"
37482      arguments="${tmp#* }"
37483
37484      # Cannot rely on the command "which" here since it doesn't always work.
37485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37486      if test -z "$is_absolute_path"; then
37487        # Path to executable is not absolute. Find it.
37488        IFS_save="$IFS"
37489        IFS=:
37490        for p in $PATH; do
37491          if test -f "$p/$path" && test -x "$p/$path"; then
37492            new_path="$p/$path"
37493            break
37494          fi
37495        done
37496        IFS="$IFS_save"
37497      else
37498        # This is an absolute path, we can use it without further modifications.
37499        new_path="$path"
37500      fi
37501
37502      if test "x$new_path" = x; then
37503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37504$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37505        has_space=`$ECHO "$complete" | $GREP " "`
37506        if test "x$has_space" != x; then
37507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37509        fi
37510        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37511      fi
37512    fi
37513
37514    # Now join together the path and the arguments once again
37515    if test "x$arguments" != xEOL; then
37516      new_complete="$new_path ${arguments% *}"
37517    else
37518      new_complete="$new_path"
37519    fi
37520
37521    if test "x$complete" != "x$new_complete"; then
37522      LD="$new_complete"
37523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37524$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37525    fi
37526  fi
37527
37528    # Verify that we indeed succeeded with this trick.
37529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37530$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37531    "$LD" --version > /dev/null
37532    if test $? -eq 0 ; then
37533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37534$as_echo "no" >&6; }
37535      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37536    else
37537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37538$as_echo "yes" >&6; }
37539    fi
37540    LDCXX="$LD"
37541  else
37542    # All other toolchains use the compiler to link.
37543    LD="$CC"
37544    LDCXX="$CXX"
37545  fi
37546
37547  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37548
37549
37550  #
37551  # Setup the assembler (AS)
37552  #
37553  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37554
37555
37556  # Publish this variable in the help.
37557
37558
37559  if [ -z "${AS+x}" ]; then
37560    # The variable is not set by user, try to locate tool using the code snippet
37561    for ac_prog in as
37562do
37563  # Extract the first word of "$ac_prog", so it can be a program name with args.
37564set dummy $ac_prog; ac_word=$2
37565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37566$as_echo_n "checking for $ac_word... " >&6; }
37567if ${ac_cv_path_AS+:} false; then :
37568  $as_echo_n "(cached) " >&6
37569else
37570  case $AS in
37571  [\\/]* | ?:[\\/]*)
37572  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37573  ;;
37574  *)
37575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37576for as_dir in $PATH
37577do
37578  IFS=$as_save_IFS
37579  test -z "$as_dir" && as_dir=.
37580    for ac_exec_ext in '' $ac_executable_extensions; do
37581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37582    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37584    break 2
37585  fi
37586done
37587  done
37588IFS=$as_save_IFS
37589
37590  ;;
37591esac
37592fi
37593AS=$ac_cv_path_AS
37594if test -n "$AS"; then
37595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37596$as_echo "$AS" >&6; }
37597else
37598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37599$as_echo "no" >&6; }
37600fi
37601
37602
37603  test -n "$AS" && break
37604done
37605
37606  else
37607    # The variable is set, but is it from the command line or the environment?
37608
37609    # Try to remove the string !AS! from our list.
37610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37612      # If it failed, the variable was not from the command line. Ignore it,
37613      # but warn the user (except for BASH, which is always set by the calling BASH).
37614      if test "xAS" != xBASH; then
37615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37616$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37617      fi
37618      # Try to locate tool using the code snippet
37619      for ac_prog in as
37620do
37621  # Extract the first word of "$ac_prog", so it can be a program name with args.
37622set dummy $ac_prog; ac_word=$2
37623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37624$as_echo_n "checking for $ac_word... " >&6; }
37625if ${ac_cv_path_AS+:} false; then :
37626  $as_echo_n "(cached) " >&6
37627else
37628  case $AS in
37629  [\\/]* | ?:[\\/]*)
37630  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37631  ;;
37632  *)
37633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37634for as_dir in $PATH
37635do
37636  IFS=$as_save_IFS
37637  test -z "$as_dir" && as_dir=.
37638    for ac_exec_ext in '' $ac_executable_extensions; do
37639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37640    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37642    break 2
37643  fi
37644done
37645  done
37646IFS=$as_save_IFS
37647
37648  ;;
37649esac
37650fi
37651AS=$ac_cv_path_AS
37652if test -n "$AS"; then
37653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37654$as_echo "$AS" >&6; }
37655else
37656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37657$as_echo "no" >&6; }
37658fi
37659
37660
37661  test -n "$AS" && break
37662done
37663
37664    else
37665      # If it succeeded, then it was overridden by the user. We will use it
37666      # for the tool.
37667
37668      # First remove it from the list of overridden variables, so we can test
37669      # for unknown variables in the end.
37670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37671
37672      # Check if we try to supply an empty value
37673      if test "x$AS" = x; then
37674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37675$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37677$as_echo_n "checking for AS... " >&6; }
37678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37679$as_echo "disabled" >&6; }
37680      else
37681        # Check if the provided tool contains a complete path.
37682        tool_specified="$AS"
37683        tool_basename="${tool_specified##*/}"
37684        if test "x$tool_basename" = "x$tool_specified"; then
37685          # A command without a complete path is provided, search $PATH.
37686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37687$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37688          # Extract the first word of "$tool_basename", so it can be a program name with args.
37689set dummy $tool_basename; ac_word=$2
37690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37691$as_echo_n "checking for $ac_word... " >&6; }
37692if ${ac_cv_path_AS+:} false; then :
37693  $as_echo_n "(cached) " >&6
37694else
37695  case $AS in
37696  [\\/]* | ?:[\\/]*)
37697  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37698  ;;
37699  *)
37700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37701for as_dir in $PATH
37702do
37703  IFS=$as_save_IFS
37704  test -z "$as_dir" && as_dir=.
37705    for ac_exec_ext in '' $ac_executable_extensions; do
37706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37707    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37709    break 2
37710  fi
37711done
37712  done
37713IFS=$as_save_IFS
37714
37715  ;;
37716esac
37717fi
37718AS=$ac_cv_path_AS
37719if test -n "$AS"; then
37720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37721$as_echo "$AS" >&6; }
37722else
37723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37724$as_echo "no" >&6; }
37725fi
37726
37727
37728          if test "x$AS" = x; then
37729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37730          fi
37731        else
37732          # Otherwise we believe it is a complete path. Use it as it is.
37733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37734$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37736$as_echo_n "checking for AS... " >&6; }
37737          if test ! -x "$tool_specified"; then
37738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37739$as_echo "not found" >&6; }
37740            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37741          fi
37742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37743$as_echo "$tool_specified" >&6; }
37744        fi
37745      fi
37746    fi
37747
37748  fi
37749
37750
37751
37752  # Only process if variable expands to non-empty
37753
37754  if test "x$AS" != 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="$AS"
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 AS, which resolves as \"$complete\", is not found." >&5
37796$as_echo "$as_me: The path of AS, 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 AS" "$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 AS, which resolves as \"$new_path\", is invalid." >&5
37823$as_echo "$as_me: The path of AS, 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 AS" "$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="$AS"
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 AS, which resolves as \"$complete\", is not found." >&5
37936$as_echo "$as_me: The path of AS, 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 AS" "$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="$AS"
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 AS, which resolves as \"$complete\", is not found." >&5
38013$as_echo "$as_me: The path of AS, 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 AS" "$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      AS="$new_complete"
38032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38033$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38034    fi
38035  fi
38036
38037    if test "x$AS" = x; then
38038      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38039    fi
38040  else
38041    # FIXME: is this correct for microsoft?
38042    AS="$CC -c"
38043  fi
38044
38045
38046  #
38047  # Setup the archiver (AR)
38048  #
38049  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38050    # The corresponding ar tool is lib.exe (used to create static libraries)
38051    # Extract the first word of "lib", so it can be a program name with args.
38052set dummy lib; ac_word=$2
38053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38054$as_echo_n "checking for $ac_word... " >&6; }
38055if ${ac_cv_prog_AR+:} false; then :
38056  $as_echo_n "(cached) " >&6
38057else
38058  if test -n "$AR"; then
38059  ac_cv_prog_AR="$AR" # Let the user override the test.
38060else
38061as_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_prog_AR="lib"
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
38076fi
38077fi
38078AR=$ac_cv_prog_AR
38079if test -n "$AR"; then
38080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38081$as_echo "$AR" >&6; }
38082else
38083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38084$as_echo "no" >&6; }
38085fi
38086
38087
38088  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38089
38090
38091  # Publish this variable in the help.
38092
38093
38094  if [ -z "${AR+x}" ]; then
38095    # The variable is not set by user, try to locate tool using the code snippet
38096    if test -n "$ac_tool_prefix"; then
38097  for ac_prog in ar gcc-ar
38098  do
38099    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38100set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38102$as_echo_n "checking for $ac_word... " >&6; }
38103if ${ac_cv_prog_AR+:} false; then :
38104  $as_echo_n "(cached) " >&6
38105else
38106  if test -n "$AR"; then
38107  ac_cv_prog_AR="$AR" # Let the user override the test.
38108else
38109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38110for as_dir in $PATH
38111do
38112  IFS=$as_save_IFS
38113  test -z "$as_dir" && as_dir=.
38114    for ac_exec_ext in '' $ac_executable_extensions; do
38115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38116    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38118    break 2
38119  fi
38120done
38121  done
38122IFS=$as_save_IFS
38123
38124fi
38125fi
38126AR=$ac_cv_prog_AR
38127if test -n "$AR"; then
38128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38129$as_echo "$AR" >&6; }
38130else
38131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38132$as_echo "no" >&6; }
38133fi
38134
38135
38136    test -n "$AR" && break
38137  done
38138fi
38139if test -z "$AR"; then
38140  ac_ct_AR=$AR
38141  for ac_prog in ar gcc-ar
38142do
38143  # Extract the first word of "$ac_prog", so it can be a program name with args.
38144set dummy $ac_prog; ac_word=$2
38145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38146$as_echo_n "checking for $ac_word... " >&6; }
38147if ${ac_cv_prog_ac_ct_AR+:} false; then :
38148  $as_echo_n "(cached) " >&6
38149else
38150  if test -n "$ac_ct_AR"; then
38151  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38152else
38153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38154for as_dir in $PATH
38155do
38156  IFS=$as_save_IFS
38157  test -z "$as_dir" && as_dir=.
38158    for ac_exec_ext in '' $ac_executable_extensions; do
38159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38160    ac_cv_prog_ac_ct_AR="$ac_prog"
38161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38162    break 2
38163  fi
38164done
38165  done
38166IFS=$as_save_IFS
38167
38168fi
38169fi
38170ac_ct_AR=$ac_cv_prog_ac_ct_AR
38171if test -n "$ac_ct_AR"; then
38172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38173$as_echo "$ac_ct_AR" >&6; }
38174else
38175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38176$as_echo "no" >&6; }
38177fi
38178
38179
38180  test -n "$ac_ct_AR" && break
38181done
38182
38183  if test "x$ac_ct_AR" = x; then
38184    AR=""
38185  else
38186    case $cross_compiling:$ac_tool_warned in
38187yes:)
38188{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38189$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38190ac_tool_warned=yes ;;
38191esac
38192    AR=$ac_ct_AR
38193  fi
38194fi
38195
38196  else
38197    # The variable is set, but is it from the command line or the environment?
38198
38199    # Try to remove the string !AR! from our list.
38200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38202      # If it failed, the variable was not from the command line. Ignore it,
38203      # but warn the user (except for BASH, which is always set by the calling BASH).
38204      if test "xAR" != xBASH; then
38205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38206$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38207      fi
38208      # Try to locate tool using the code snippet
38209      if test -n "$ac_tool_prefix"; then
38210  for ac_prog in ar gcc-ar
38211  do
38212    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38215$as_echo_n "checking for $ac_word... " >&6; }
38216if ${ac_cv_prog_AR+:} false; then :
38217  $as_echo_n "(cached) " >&6
38218else
38219  if test -n "$AR"; then
38220  ac_cv_prog_AR="$AR" # Let the user override the test.
38221else
38222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38223for as_dir in $PATH
38224do
38225  IFS=$as_save_IFS
38226  test -z "$as_dir" && as_dir=.
38227    for ac_exec_ext in '' $ac_executable_extensions; do
38228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38229    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38231    break 2
38232  fi
38233done
38234  done
38235IFS=$as_save_IFS
38236
38237fi
38238fi
38239AR=$ac_cv_prog_AR
38240if test -n "$AR"; then
38241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38242$as_echo "$AR" >&6; }
38243else
38244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38245$as_echo "no" >&6; }
38246fi
38247
38248
38249    test -n "$AR" && break
38250  done
38251fi
38252if test -z "$AR"; then
38253  ac_ct_AR=$AR
38254  for ac_prog in ar gcc-ar
38255do
38256  # Extract the first word of "$ac_prog", so it can be a program name with args.
38257set dummy $ac_prog; ac_word=$2
38258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38259$as_echo_n "checking for $ac_word... " >&6; }
38260if ${ac_cv_prog_ac_ct_AR+:} false; then :
38261  $as_echo_n "(cached) " >&6
38262else
38263  if test -n "$ac_ct_AR"; then
38264  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38265else
38266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38267for as_dir in $PATH
38268do
38269  IFS=$as_save_IFS
38270  test -z "$as_dir" && as_dir=.
38271    for ac_exec_ext in '' $ac_executable_extensions; do
38272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38273    ac_cv_prog_ac_ct_AR="$ac_prog"
38274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38275    break 2
38276  fi
38277done
38278  done
38279IFS=$as_save_IFS
38280
38281fi
38282fi
38283ac_ct_AR=$ac_cv_prog_ac_ct_AR
38284if test -n "$ac_ct_AR"; then
38285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38286$as_echo "$ac_ct_AR" >&6; }
38287else
38288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38289$as_echo "no" >&6; }
38290fi
38291
38292
38293  test -n "$ac_ct_AR" && break
38294done
38295
38296  if test "x$ac_ct_AR" = x; then
38297    AR=""
38298  else
38299    case $cross_compiling:$ac_tool_warned in
38300yes:)
38301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38303ac_tool_warned=yes ;;
38304esac
38305    AR=$ac_ct_AR
38306  fi
38307fi
38308
38309    else
38310      # If it succeeded, then it was overridden by the user. We will use it
38311      # for the tool.
38312
38313      # First remove it from the list of overridden variables, so we can test
38314      # for unknown variables in the end.
38315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38316
38317      # Check if we try to supply an empty value
38318      if test "x$AR" = x; then
38319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38320$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38322$as_echo_n "checking for AR... " >&6; }
38323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38324$as_echo "disabled" >&6; }
38325      else
38326        # Check if the provided tool contains a complete path.
38327        tool_specified="$AR"
38328        tool_basename="${tool_specified##*/}"
38329        if test "x$tool_basename" = "x$tool_specified"; then
38330          # A command without a complete path is provided, search $PATH.
38331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38332$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38333          # Extract the first word of "$tool_basename", so it can be a program name with args.
38334set dummy $tool_basename; ac_word=$2
38335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38336$as_echo_n "checking for $ac_word... " >&6; }
38337if ${ac_cv_path_AR+:} false; then :
38338  $as_echo_n "(cached) " >&6
38339else
38340  case $AR in
38341  [\\/]* | ?:[\\/]*)
38342  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38343  ;;
38344  *)
38345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38346for as_dir in $PATH
38347do
38348  IFS=$as_save_IFS
38349  test -z "$as_dir" && as_dir=.
38350    for ac_exec_ext in '' $ac_executable_extensions; do
38351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38352    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38354    break 2
38355  fi
38356done
38357  done
38358IFS=$as_save_IFS
38359
38360  ;;
38361esac
38362fi
38363AR=$ac_cv_path_AR
38364if test -n "$AR"; then
38365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38366$as_echo "$AR" >&6; }
38367else
38368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38369$as_echo "no" >&6; }
38370fi
38371
38372
38373          if test "x$AR" = x; then
38374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38375          fi
38376        else
38377          # Otherwise we believe it is a complete path. Use it as it is.
38378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38379$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38381$as_echo_n "checking for AR... " >&6; }
38382          if test ! -x "$tool_specified"; then
38383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38384$as_echo "not found" >&6; }
38385            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38386          fi
38387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38388$as_echo "$tool_specified" >&6; }
38389        fi
38390      fi
38391    fi
38392
38393  fi
38394
38395
38396  else
38397
38398
38399  # Publish this variable in the help.
38400
38401
38402  if [ -z "${AR+x}" ]; then
38403    # The variable is not set by user, try to locate tool using the code snippet
38404    if test -n "$ac_tool_prefix"; then
38405  for ac_prog in ar
38406  do
38407    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38408set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38410$as_echo_n "checking for $ac_word... " >&6; }
38411if ${ac_cv_prog_AR+:} false; then :
38412  $as_echo_n "(cached) " >&6
38413else
38414  if test -n "$AR"; then
38415  ac_cv_prog_AR="$AR" # Let the user override the test.
38416else
38417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38418for as_dir in $PATH
38419do
38420  IFS=$as_save_IFS
38421  test -z "$as_dir" && as_dir=.
38422    for ac_exec_ext in '' $ac_executable_extensions; do
38423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38424    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38426    break 2
38427  fi
38428done
38429  done
38430IFS=$as_save_IFS
38431
38432fi
38433fi
38434AR=$ac_cv_prog_AR
38435if test -n "$AR"; then
38436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38437$as_echo "$AR" >&6; }
38438else
38439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38440$as_echo "no" >&6; }
38441fi
38442
38443
38444    test -n "$AR" && break
38445  done
38446fi
38447if test -z "$AR"; then
38448  ac_ct_AR=$AR
38449  for ac_prog in ar
38450do
38451  # Extract the first word of "$ac_prog", so it can be a program name with args.
38452set dummy $ac_prog; ac_word=$2
38453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38454$as_echo_n "checking for $ac_word... " >&6; }
38455if ${ac_cv_prog_ac_ct_AR+:} false; then :
38456  $as_echo_n "(cached) " >&6
38457else
38458  if test -n "$ac_ct_AR"; then
38459  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38460else
38461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38462for as_dir in $PATH
38463do
38464  IFS=$as_save_IFS
38465  test -z "$as_dir" && as_dir=.
38466    for ac_exec_ext in '' $ac_executable_extensions; do
38467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38468    ac_cv_prog_ac_ct_AR="$ac_prog"
38469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38470    break 2
38471  fi
38472done
38473  done
38474IFS=$as_save_IFS
38475
38476fi
38477fi
38478ac_ct_AR=$ac_cv_prog_ac_ct_AR
38479if test -n "$ac_ct_AR"; then
38480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38481$as_echo "$ac_ct_AR" >&6; }
38482else
38483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38484$as_echo "no" >&6; }
38485fi
38486
38487
38488  test -n "$ac_ct_AR" && break
38489done
38490
38491  if test "x$ac_ct_AR" = x; then
38492    AR=""
38493  else
38494    case $cross_compiling:$ac_tool_warned in
38495yes:)
38496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38498ac_tool_warned=yes ;;
38499esac
38500    AR=$ac_ct_AR
38501  fi
38502fi
38503
38504  else
38505    # The variable is set, but is it from the command line or the environment?
38506
38507    # Try to remove the string !AR! from our list.
38508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38510      # If it failed, the variable was not from the command line. Ignore it,
38511      # but warn the user (except for BASH, which is always set by the calling BASH).
38512      if test "xAR" != xBASH; then
38513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38514$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38515      fi
38516      # Try to locate tool using the code snippet
38517      if test -n "$ac_tool_prefix"; then
38518  for ac_prog in ar
38519  do
38520    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38521set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38523$as_echo_n "checking for $ac_word... " >&6; }
38524if ${ac_cv_prog_AR+:} false; then :
38525  $as_echo_n "(cached) " >&6
38526else
38527  if test -n "$AR"; then
38528  ac_cv_prog_AR="$AR" # Let the user override the test.
38529else
38530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38531for as_dir in $PATH
38532do
38533  IFS=$as_save_IFS
38534  test -z "$as_dir" && as_dir=.
38535    for ac_exec_ext in '' $ac_executable_extensions; do
38536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38537    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38539    break 2
38540  fi
38541done
38542  done
38543IFS=$as_save_IFS
38544
38545fi
38546fi
38547AR=$ac_cv_prog_AR
38548if test -n "$AR"; then
38549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38550$as_echo "$AR" >&6; }
38551else
38552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38553$as_echo "no" >&6; }
38554fi
38555
38556
38557    test -n "$AR" && break
38558  done
38559fi
38560if test -z "$AR"; then
38561  ac_ct_AR=$AR
38562  for ac_prog in ar
38563do
38564  # Extract the first word of "$ac_prog", so it can be a program name with args.
38565set dummy $ac_prog; ac_word=$2
38566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38567$as_echo_n "checking for $ac_word... " >&6; }
38568if ${ac_cv_prog_ac_ct_AR+:} false; then :
38569  $as_echo_n "(cached) " >&6
38570else
38571  if test -n "$ac_ct_AR"; then
38572  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38573else
38574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38575for as_dir in $PATH
38576do
38577  IFS=$as_save_IFS
38578  test -z "$as_dir" && as_dir=.
38579    for ac_exec_ext in '' $ac_executable_extensions; do
38580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38581    ac_cv_prog_ac_ct_AR="$ac_prog"
38582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38583    break 2
38584  fi
38585done
38586  done
38587IFS=$as_save_IFS
38588
38589fi
38590fi
38591ac_ct_AR=$ac_cv_prog_ac_ct_AR
38592if test -n "$ac_ct_AR"; then
38593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38594$as_echo "$ac_ct_AR" >&6; }
38595else
38596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38597$as_echo "no" >&6; }
38598fi
38599
38600
38601  test -n "$ac_ct_AR" && break
38602done
38603
38604  if test "x$ac_ct_AR" = x; then
38605    AR=""
38606  else
38607    case $cross_compiling:$ac_tool_warned in
38608yes:)
38609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38611ac_tool_warned=yes ;;
38612esac
38613    AR=$ac_ct_AR
38614  fi
38615fi
38616
38617    else
38618      # If it succeeded, then it was overridden by the user. We will use it
38619      # for the tool.
38620
38621      # First remove it from the list of overridden variables, so we can test
38622      # for unknown variables in the end.
38623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38624
38625      # Check if we try to supply an empty value
38626      if test "x$AR" = x; then
38627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38628$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38630$as_echo_n "checking for AR... " >&6; }
38631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38632$as_echo "disabled" >&6; }
38633      else
38634        # Check if the provided tool contains a complete path.
38635        tool_specified="$AR"
38636        tool_basename="${tool_specified##*/}"
38637        if test "x$tool_basename" = "x$tool_specified"; then
38638          # A command without a complete path is provided, search $PATH.
38639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38640$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38641          # Extract the first word of "$tool_basename", so it can be a program name with args.
38642set dummy $tool_basename; ac_word=$2
38643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38644$as_echo_n "checking for $ac_word... " >&6; }
38645if ${ac_cv_path_AR+:} false; then :
38646  $as_echo_n "(cached) " >&6
38647else
38648  case $AR in
38649  [\\/]* | ?:[\\/]*)
38650  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38651  ;;
38652  *)
38653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38654for as_dir in $PATH
38655do
38656  IFS=$as_save_IFS
38657  test -z "$as_dir" && as_dir=.
38658    for ac_exec_ext in '' $ac_executable_extensions; do
38659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38660    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38662    break 2
38663  fi
38664done
38665  done
38666IFS=$as_save_IFS
38667
38668  ;;
38669esac
38670fi
38671AR=$ac_cv_path_AR
38672if test -n "$AR"; then
38673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38674$as_echo "$AR" >&6; }
38675else
38676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38677$as_echo "no" >&6; }
38678fi
38679
38680
38681          if test "x$AR" = x; then
38682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38683          fi
38684        else
38685          # Otherwise we believe it is a complete path. Use it as it is.
38686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38687$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38689$as_echo_n "checking for AR... " >&6; }
38690          if test ! -x "$tool_specified"; then
38691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38692$as_echo "not found" >&6; }
38693            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38694          fi
38695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38696$as_echo "$tool_specified" >&6; }
38697        fi
38698      fi
38699    fi
38700
38701  fi
38702
38703
38704  fi
38705
38706  # Only process if variable expands to non-empty
38707
38708  if test "x$AR" != x; then
38709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38710
38711  # First separate the path from the arguments. This will split at the first
38712  # space.
38713  complete="$AR"
38714  path="${complete%% *}"
38715  tmp="$complete EOL"
38716  arguments="${tmp#* }"
38717
38718  # Input might be given as Windows format, start by converting to
38719  # unix format.
38720  new_path=`$CYGPATH -u "$path"`
38721
38722  # Now try to locate executable using which
38723  new_path=`$WHICH "$new_path" 2> /dev/null`
38724  # bat and cmd files are not always considered executable in cygwin causing which
38725  # to not find them
38726  if test "x$new_path" = x \
38727      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38728      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38729    new_path=`$CYGPATH -u "$path"`
38730  fi
38731  if test "x$new_path" = x; then
38732    # Oops. Which didn't find the executable.
38733    # The splitting of arguments from the executable at a space might have been incorrect,
38734    # since paths with space are more likely in Windows. Give it another try with the whole
38735    # argument.
38736    path="$complete"
38737    arguments="EOL"
38738    new_path=`$CYGPATH -u "$path"`
38739    new_path=`$WHICH "$new_path" 2> /dev/null`
38740    # bat and cmd files are not always considered executable in cygwin causing which
38741    # to not find them
38742    if test "x$new_path" = x \
38743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38745      new_path=`$CYGPATH -u "$path"`
38746    fi
38747    if test "x$new_path" = x; then
38748      # It's still not found. Now this is an unrecoverable error.
38749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38750$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38751      has_space=`$ECHO "$complete" | $GREP " "`
38752      if test "x$has_space" != x; then
38753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38755      fi
38756      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38757    fi
38758  fi
38759
38760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38763  # "foo.exe" is OK but "foo" is an error.
38764  #
38765  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38766  # It is also a way to make sure we got the proper file name for the real test later on.
38767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38768  if test "x$test_shortpath" = x; then
38769    # Short path failed, file does not exist as specified.
38770    # Try adding .exe or .cmd
38771    if test -f "${new_path}.exe"; then
38772      input_to_shortpath="${new_path}.exe"
38773    elif test -f "${new_path}.cmd"; then
38774      input_to_shortpath="${new_path}.cmd"
38775    else
38776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38777$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38778      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38779$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38780      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38781    fi
38782  else
38783    input_to_shortpath="$new_path"
38784  fi
38785
38786  # Call helper function which possibly converts this using DOS-style short mode.
38787  # If so, the updated path is stored in $new_path.
38788  new_path="$input_to_shortpath"
38789
38790  input_path="$input_to_shortpath"
38791  # Check if we need to convert this using DOS-style short mode. If the path
38792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38793  # take no chances and rewrite it.
38794  # Note: m4 eats our [], so we need to use [ and ] instead.
38795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38796  if test "x$has_forbidden_chars" != x; then
38797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38801      # Going to short mode and back again did indeed matter. Since short mode is
38802      # case insensitive, let's make it lowercase to improve readability.
38803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38804      # Now convert it back to Unix-style (cygpath)
38805      input_path=`$CYGPATH -u "$shortmode_path"`
38806      new_path="$input_path"
38807    fi
38808  fi
38809
38810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38811  if test "x$test_cygdrive_prefix" = x; then
38812    # As a simple fix, exclude /usr/bin since it's not a real path.
38813    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38815      # a path prefixed by /cygdrive for fixpath to work.
38816      new_path="$CYGWIN_ROOT_PATH$input_path"
38817    fi
38818  fi
38819
38820  # remove trailing .exe if any
38821  new_path="${new_path/%.exe/}"
38822
38823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38824
38825  # First separate the path from the arguments. This will split at the first
38826  # space.
38827  complete="$AR"
38828  path="${complete%% *}"
38829  tmp="$complete EOL"
38830  arguments="${tmp#* }"
38831
38832  # Input might be given as Windows format, start by converting to
38833  # unix format.
38834  new_path="$path"
38835
38836  windows_path="$new_path"
38837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38838    unix_path=`$CYGPATH -u "$windows_path"`
38839    new_path="$unix_path"
38840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38842    new_path="$unix_path"
38843  fi
38844
38845
38846  # Now try to locate executable using which
38847  new_path=`$WHICH "$new_path" 2> /dev/null`
38848
38849  if test "x$new_path" = x; then
38850    # Oops. Which didn't find the executable.
38851    # The splitting of arguments from the executable at a space might have been incorrect,
38852    # since paths with space are more likely in Windows. Give it another try with the whole
38853    # argument.
38854    path="$complete"
38855    arguments="EOL"
38856    new_path="$path"
38857
38858  windows_path="$new_path"
38859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38860    unix_path=`$CYGPATH -u "$windows_path"`
38861    new_path="$unix_path"
38862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38864    new_path="$unix_path"
38865  fi
38866
38867
38868    new_path=`$WHICH "$new_path" 2> /dev/null`
38869    # bat and cmd files are not always considered executable in MSYS causing which
38870    # to not find them
38871    if test "x$new_path" = x \
38872        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38873        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38874      new_path="$path"
38875
38876  windows_path="$new_path"
38877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38878    unix_path=`$CYGPATH -u "$windows_path"`
38879    new_path="$unix_path"
38880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38882    new_path="$unix_path"
38883  fi
38884
38885    fi
38886
38887    if test "x$new_path" = x; then
38888      # It's still not found. Now this is an unrecoverable error.
38889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38890$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38891      has_space=`$ECHO "$complete" | $GREP " "`
38892      if test "x$has_space" != x; then
38893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38895      fi
38896      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38897    fi
38898  fi
38899
38900  # Now new_path has a complete unix path to the binary
38901  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38902    # Keep paths in /bin as-is, but remove trailing .exe if any
38903    new_path="${new_path/%.exe/}"
38904    # Do not save /bin paths to all_fixpath_prefixes!
38905  else
38906    # Not in mixed or Windows style, start by that.
38907    new_path=`cmd //c echo $new_path`
38908
38909  input_path="$new_path"
38910  # Check if we need to convert this using DOS-style short mode. If the path
38911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38912  # take no chances and rewrite it.
38913  # Note: m4 eats our [], so we need to use [ and ] instead.
38914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38915  if test "x$has_forbidden_chars" != x; then
38916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38918  fi
38919
38920    # Output is in $new_path
38921
38922  windows_path="$new_path"
38923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38924    unix_path=`$CYGPATH -u "$windows_path"`
38925    new_path="$unix_path"
38926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38928    new_path="$unix_path"
38929  fi
38930
38931    # remove trailing .exe if any
38932    new_path="${new_path/%.exe/}"
38933
38934    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38935    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38936  fi
38937
38938    else
38939      # We're on a unix platform. Hooray! :)
38940      # First separate the path from the arguments. This will split at the first
38941      # space.
38942      complete="$AR"
38943      path="${complete%% *}"
38944      tmp="$complete EOL"
38945      arguments="${tmp#* }"
38946
38947      # Cannot rely on the command "which" here since it doesn't always work.
38948      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38949      if test -z "$is_absolute_path"; then
38950        # Path to executable is not absolute. Find it.
38951        IFS_save="$IFS"
38952        IFS=:
38953        for p in $PATH; do
38954          if test -f "$p/$path" && test -x "$p/$path"; then
38955            new_path="$p/$path"
38956            break
38957          fi
38958        done
38959        IFS="$IFS_save"
38960      else
38961        # This is an absolute path, we can use it without further modifications.
38962        new_path="$path"
38963      fi
38964
38965      if test "x$new_path" = x; then
38966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38967$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38968        has_space=`$ECHO "$complete" | $GREP " "`
38969        if test "x$has_space" != x; then
38970          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38971$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38972        fi
38973        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38974      fi
38975    fi
38976
38977    # Now join together the path and the arguments once again
38978    if test "x$arguments" != xEOL; then
38979      new_complete="$new_path ${arguments% *}"
38980    else
38981      new_complete="$new_path"
38982    fi
38983
38984    if test "x$complete" != "x$new_complete"; then
38985      AR="$new_complete"
38986      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38987$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38988    fi
38989  fi
38990
38991
38992
38993  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38994
38995
38996  # Publish this variable in the help.
38997
38998
38999  if [ -z "${LIPO+x}" ]; then
39000    # The variable is not set by user, try to locate tool using the code snippet
39001    for ac_prog in lipo
39002do
39003  # Extract the first word of "$ac_prog", so it can be a program name with args.
39004set dummy $ac_prog; ac_word=$2
39005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39006$as_echo_n "checking for $ac_word... " >&6; }
39007if ${ac_cv_path_LIPO+:} false; then :
39008  $as_echo_n "(cached) " >&6
39009else
39010  case $LIPO in
39011  [\\/]* | ?:[\\/]*)
39012  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39013  ;;
39014  *)
39015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39016for as_dir in $PATH
39017do
39018  IFS=$as_save_IFS
39019  test -z "$as_dir" && as_dir=.
39020    for ac_exec_ext in '' $ac_executable_extensions; do
39021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39022    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39024    break 2
39025  fi
39026done
39027  done
39028IFS=$as_save_IFS
39029
39030  ;;
39031esac
39032fi
39033LIPO=$ac_cv_path_LIPO
39034if test -n "$LIPO"; then
39035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39036$as_echo "$LIPO" >&6; }
39037else
39038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39039$as_echo "no" >&6; }
39040fi
39041
39042
39043  test -n "$LIPO" && break
39044done
39045
39046  else
39047    # The variable is set, but is it from the command line or the environment?
39048
39049    # Try to remove the string !LIPO! from our list.
39050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39052      # If it failed, the variable was not from the command line. Ignore it,
39053      # but warn the user (except for BASH, which is always set by the calling BASH).
39054      if test "xLIPO" != xBASH; then
39055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39056$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39057      fi
39058      # Try to locate tool using the code snippet
39059      for ac_prog in lipo
39060do
39061  # Extract the first word of "$ac_prog", so it can be a program name with args.
39062set dummy $ac_prog; ac_word=$2
39063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39064$as_echo_n "checking for $ac_word... " >&6; }
39065if ${ac_cv_path_LIPO+:} false; then :
39066  $as_echo_n "(cached) " >&6
39067else
39068  case $LIPO in
39069  [\\/]* | ?:[\\/]*)
39070  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39071  ;;
39072  *)
39073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39074for as_dir in $PATH
39075do
39076  IFS=$as_save_IFS
39077  test -z "$as_dir" && as_dir=.
39078    for ac_exec_ext in '' $ac_executable_extensions; do
39079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39080    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39082    break 2
39083  fi
39084done
39085  done
39086IFS=$as_save_IFS
39087
39088  ;;
39089esac
39090fi
39091LIPO=$ac_cv_path_LIPO
39092if test -n "$LIPO"; then
39093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39094$as_echo "$LIPO" >&6; }
39095else
39096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39097$as_echo "no" >&6; }
39098fi
39099
39100
39101  test -n "$LIPO" && break
39102done
39103
39104    else
39105      # If it succeeded, then it was overridden by the user. We will use it
39106      # for the tool.
39107
39108      # First remove it from the list of overridden variables, so we can test
39109      # for unknown variables in the end.
39110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39111
39112      # Check if we try to supply an empty value
39113      if test "x$LIPO" = x; then
39114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39115$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39117$as_echo_n "checking for LIPO... " >&6; }
39118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39119$as_echo "disabled" >&6; }
39120      else
39121        # Check if the provided tool contains a complete path.
39122        tool_specified="$LIPO"
39123        tool_basename="${tool_specified##*/}"
39124        if test "x$tool_basename" = "x$tool_specified"; then
39125          # A command without a complete path is provided, search $PATH.
39126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39127$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39128          # Extract the first word of "$tool_basename", so it can be a program name with args.
39129set dummy $tool_basename; ac_word=$2
39130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39131$as_echo_n "checking for $ac_word... " >&6; }
39132if ${ac_cv_path_LIPO+:} false; then :
39133  $as_echo_n "(cached) " >&6
39134else
39135  case $LIPO in
39136  [\\/]* | ?:[\\/]*)
39137  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39138  ;;
39139  *)
39140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39141for as_dir in $PATH
39142do
39143  IFS=$as_save_IFS
39144  test -z "$as_dir" && as_dir=.
39145    for ac_exec_ext in '' $ac_executable_extensions; do
39146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39147    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39149    break 2
39150  fi
39151done
39152  done
39153IFS=$as_save_IFS
39154
39155  ;;
39156esac
39157fi
39158LIPO=$ac_cv_path_LIPO
39159if test -n "$LIPO"; then
39160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39161$as_echo "$LIPO" >&6; }
39162else
39163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39164$as_echo "no" >&6; }
39165fi
39166
39167
39168          if test "x$LIPO" = x; then
39169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39170          fi
39171        else
39172          # Otherwise we believe it is a complete path. Use it as it is.
39173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39174$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39176$as_echo_n "checking for LIPO... " >&6; }
39177          if test ! -x "$tool_specified"; then
39178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39179$as_echo "not found" >&6; }
39180            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39181          fi
39182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39183$as_echo "$tool_specified" >&6; }
39184        fi
39185      fi
39186    fi
39187
39188  fi
39189
39190
39191
39192  # Only process if variable expands to non-empty
39193
39194  if test "x$LIPO" != x; then
39195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39196
39197  # First separate the path from the arguments. This will split at the first
39198  # space.
39199  complete="$LIPO"
39200  path="${complete%% *}"
39201  tmp="$complete EOL"
39202  arguments="${tmp#* }"
39203
39204  # Input might be given as Windows format, start by converting to
39205  # unix format.
39206  new_path=`$CYGPATH -u "$path"`
39207
39208  # Now try to locate executable using which
39209  new_path=`$WHICH "$new_path" 2> /dev/null`
39210  # bat and cmd files are not always considered executable in cygwin causing which
39211  # to not find them
39212  if test "x$new_path" = x \
39213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39215    new_path=`$CYGPATH -u "$path"`
39216  fi
39217  if test "x$new_path" = x; then
39218    # Oops. Which didn't find the executable.
39219    # The splitting of arguments from the executable at a space might have been incorrect,
39220    # since paths with space are more likely in Windows. Give it another try with the whole
39221    # argument.
39222    path="$complete"
39223    arguments="EOL"
39224    new_path=`$CYGPATH -u "$path"`
39225    new_path=`$WHICH "$new_path" 2> /dev/null`
39226    # bat and cmd files are not always considered executable in cygwin causing which
39227    # to not find them
39228    if test "x$new_path" = x \
39229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39231      new_path=`$CYGPATH -u "$path"`
39232    fi
39233    if test "x$new_path" = x; then
39234      # It's still not found. Now this is an unrecoverable error.
39235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39236$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39237      has_space=`$ECHO "$complete" | $GREP " "`
39238      if test "x$has_space" != x; then
39239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39241      fi
39242      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39243    fi
39244  fi
39245
39246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39249  # "foo.exe" is OK but "foo" is an error.
39250  #
39251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39252  # It is also a way to make sure we got the proper file name for the real test later on.
39253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39254  if test "x$test_shortpath" = x; then
39255    # Short path failed, file does not exist as specified.
39256    # Try adding .exe or .cmd
39257    if test -f "${new_path}.exe"; then
39258      input_to_shortpath="${new_path}.exe"
39259    elif test -f "${new_path}.cmd"; then
39260      input_to_shortpath="${new_path}.cmd"
39261    else
39262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39263$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39266      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39267    fi
39268  else
39269    input_to_shortpath="$new_path"
39270  fi
39271
39272  # Call helper function which possibly converts this using DOS-style short mode.
39273  # If so, the updated path is stored in $new_path.
39274  new_path="$input_to_shortpath"
39275
39276  input_path="$input_to_shortpath"
39277  # Check if we need to convert this using DOS-style short mode. If the path
39278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39279  # take no chances and rewrite it.
39280  # Note: m4 eats our [], so we need to use [ and ] instead.
39281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39282  if test "x$has_forbidden_chars" != x; then
39283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39287      # Going to short mode and back again did indeed matter. Since short mode is
39288      # case insensitive, let's make it lowercase to improve readability.
39289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39290      # Now convert it back to Unix-style (cygpath)
39291      input_path=`$CYGPATH -u "$shortmode_path"`
39292      new_path="$input_path"
39293    fi
39294  fi
39295
39296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39297  if test "x$test_cygdrive_prefix" = x; then
39298    # As a simple fix, exclude /usr/bin since it's not a real path.
39299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39301      # a path prefixed by /cygdrive for fixpath to work.
39302      new_path="$CYGWIN_ROOT_PATH$input_path"
39303    fi
39304  fi
39305
39306  # remove trailing .exe if any
39307  new_path="${new_path/%.exe/}"
39308
39309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39310
39311  # First separate the path from the arguments. This will split at the first
39312  # space.
39313  complete="$LIPO"
39314  path="${complete%% *}"
39315  tmp="$complete EOL"
39316  arguments="${tmp#* }"
39317
39318  # Input might be given as Windows format, start by converting to
39319  # unix format.
39320  new_path="$path"
39321
39322  windows_path="$new_path"
39323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39324    unix_path=`$CYGPATH -u "$windows_path"`
39325    new_path="$unix_path"
39326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39328    new_path="$unix_path"
39329  fi
39330
39331
39332  # Now try to locate executable using which
39333  new_path=`$WHICH "$new_path" 2> /dev/null`
39334
39335  if test "x$new_path" = x; then
39336    # Oops. Which didn't find the executable.
39337    # The splitting of arguments from the executable at a space might have been incorrect,
39338    # since paths with space are more likely in Windows. Give it another try with the whole
39339    # argument.
39340    path="$complete"
39341    arguments="EOL"
39342    new_path="$path"
39343
39344  windows_path="$new_path"
39345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39346    unix_path=`$CYGPATH -u "$windows_path"`
39347    new_path="$unix_path"
39348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39350    new_path="$unix_path"
39351  fi
39352
39353
39354    new_path=`$WHICH "$new_path" 2> /dev/null`
39355    # bat and cmd files are not always considered executable in MSYS causing which
39356    # to not find them
39357    if test "x$new_path" = x \
39358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39360      new_path="$path"
39361
39362  windows_path="$new_path"
39363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39364    unix_path=`$CYGPATH -u "$windows_path"`
39365    new_path="$unix_path"
39366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39368    new_path="$unix_path"
39369  fi
39370
39371    fi
39372
39373    if test "x$new_path" = x; then
39374      # It's still not found. Now this is an unrecoverable error.
39375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39376$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39377      has_space=`$ECHO "$complete" | $GREP " "`
39378      if test "x$has_space" != x; then
39379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39381      fi
39382      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39383    fi
39384  fi
39385
39386  # Now new_path has a complete unix path to the binary
39387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39388    # Keep paths in /bin as-is, but remove trailing .exe if any
39389    new_path="${new_path/%.exe/}"
39390    # Do not save /bin paths to all_fixpath_prefixes!
39391  else
39392    # Not in mixed or Windows style, start by that.
39393    new_path=`cmd //c echo $new_path`
39394
39395  input_path="$new_path"
39396  # Check if we need to convert this using DOS-style short mode. If the path
39397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39398  # take no chances and rewrite it.
39399  # Note: m4 eats our [], so we need to use [ and ] instead.
39400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39401  if test "x$has_forbidden_chars" != x; then
39402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39404  fi
39405
39406    # Output is in $new_path
39407
39408  windows_path="$new_path"
39409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39410    unix_path=`$CYGPATH -u "$windows_path"`
39411    new_path="$unix_path"
39412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39414    new_path="$unix_path"
39415  fi
39416
39417    # remove trailing .exe if any
39418    new_path="${new_path/%.exe/}"
39419
39420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39422  fi
39423
39424    else
39425      # We're on a unix platform. Hooray! :)
39426      # First separate the path from the arguments. This will split at the first
39427      # space.
39428      complete="$LIPO"
39429      path="${complete%% *}"
39430      tmp="$complete EOL"
39431      arguments="${tmp#* }"
39432
39433      # Cannot rely on the command "which" here since it doesn't always work.
39434      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39435      if test -z "$is_absolute_path"; then
39436        # Path to executable is not absolute. Find it.
39437        IFS_save="$IFS"
39438        IFS=:
39439        for p in $PATH; do
39440          if test -f "$p/$path" && test -x "$p/$path"; then
39441            new_path="$p/$path"
39442            break
39443          fi
39444        done
39445        IFS="$IFS_save"
39446      else
39447        # This is an absolute path, we can use it without further modifications.
39448        new_path="$path"
39449      fi
39450
39451      if test "x$new_path" = x; then
39452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39453$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39454        has_space=`$ECHO "$complete" | $GREP " "`
39455        if test "x$has_space" != x; then
39456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39458        fi
39459        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39460      fi
39461    fi
39462
39463    # Now join together the path and the arguments once again
39464    if test "x$arguments" != xEOL; then
39465      new_complete="$new_path ${arguments% *}"
39466    else
39467      new_complete="$new_path"
39468    fi
39469
39470    if test "x$complete" != "x$new_complete"; then
39471      LIPO="$new_complete"
39472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39473$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39474    fi
39475  fi
39476
39477  fi
39478
39479  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39480    # Extract the first word of "mt", so it can be a program name with args.
39481set dummy mt; ac_word=$2
39482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39483$as_echo_n "checking for $ac_word... " >&6; }
39484if ${ac_cv_prog_MT+:} false; then :
39485  $as_echo_n "(cached) " >&6
39486else
39487  if test -n "$MT"; then
39488  ac_cv_prog_MT="$MT" # Let the user override the test.
39489else
39490  ac_prog_rejected=no
39491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39492for as_dir in $PATH
39493do
39494  IFS=$as_save_IFS
39495  test -z "$as_dir" && as_dir=.
39496    for ac_exec_ext in '' $ac_executable_extensions; do
39497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39498    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39499       ac_prog_rejected=yes
39500       continue
39501     fi
39502    ac_cv_prog_MT="mt"
39503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39504    break 2
39505  fi
39506done
39507  done
39508IFS=$as_save_IFS
39509
39510if test $ac_prog_rejected = yes; then
39511  # We found a bogon in the path, so make sure we never use it.
39512  set dummy $ac_cv_prog_MT
39513  shift
39514  if test $# != 0; then
39515    # We chose a different compiler from the bogus one.
39516    # However, it has the same basename, so the bogon will be chosen
39517    # first if we set MT to just the basename; use the full file name.
39518    shift
39519    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39520  fi
39521fi
39522fi
39523fi
39524MT=$ac_cv_prog_MT
39525if test -n "$MT"; then
39526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39527$as_echo "$MT" >&6; }
39528else
39529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39530$as_echo "no" >&6; }
39531fi
39532
39533
39534
39535  # Only process if variable expands to non-empty
39536
39537  if test "x$MT" != x; then
39538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39539
39540  # First separate the path from the arguments. This will split at the first
39541  # space.
39542  complete="$MT"
39543  path="${complete%% *}"
39544  tmp="$complete EOL"
39545  arguments="${tmp#* }"
39546
39547  # Input might be given as Windows format, start by converting to
39548  # unix format.
39549  new_path=`$CYGPATH -u "$path"`
39550
39551  # Now try to locate executable using which
39552  new_path=`$WHICH "$new_path" 2> /dev/null`
39553  # bat and cmd files are not always considered executable in cygwin causing which
39554  # to not find them
39555  if test "x$new_path" = x \
39556      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39557      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39558    new_path=`$CYGPATH -u "$path"`
39559  fi
39560  if test "x$new_path" = x; then
39561    # Oops. Which didn't find the executable.
39562    # The splitting of arguments from the executable at a space might have been incorrect,
39563    # since paths with space are more likely in Windows. Give it another try with the whole
39564    # argument.
39565    path="$complete"
39566    arguments="EOL"
39567    new_path=`$CYGPATH -u "$path"`
39568    new_path=`$WHICH "$new_path" 2> /dev/null`
39569    # bat and cmd files are not always considered executable in cygwin causing which
39570    # to not find them
39571    if test "x$new_path" = x \
39572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39574      new_path=`$CYGPATH -u "$path"`
39575    fi
39576    if test "x$new_path" = x; then
39577      # It's still not found. Now this is an unrecoverable error.
39578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39579$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39580      has_space=`$ECHO "$complete" | $GREP " "`
39581      if test "x$has_space" != x; then
39582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39584      fi
39585      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39586    fi
39587  fi
39588
39589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39592  # "foo.exe" is OK but "foo" is an error.
39593  #
39594  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39595  # It is also a way to make sure we got the proper file name for the real test later on.
39596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39597  if test "x$test_shortpath" = x; then
39598    # Short path failed, file does not exist as specified.
39599    # Try adding .exe or .cmd
39600    if test -f "${new_path}.exe"; then
39601      input_to_shortpath="${new_path}.exe"
39602    elif test -f "${new_path}.cmd"; then
39603      input_to_shortpath="${new_path}.cmd"
39604    else
39605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39606$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39609      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39610    fi
39611  else
39612    input_to_shortpath="$new_path"
39613  fi
39614
39615  # Call helper function which possibly converts this using DOS-style short mode.
39616  # If so, the updated path is stored in $new_path.
39617  new_path="$input_to_shortpath"
39618
39619  input_path="$input_to_shortpath"
39620  # Check if we need to convert this using DOS-style short mode. If the path
39621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39622  # take no chances and rewrite it.
39623  # Note: m4 eats our [], so we need to use [ and ] instead.
39624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39625  if test "x$has_forbidden_chars" != x; then
39626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39630      # Going to short mode and back again did indeed matter. Since short mode is
39631      # case insensitive, let's make it lowercase to improve readability.
39632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39633      # Now convert it back to Unix-style (cygpath)
39634      input_path=`$CYGPATH -u "$shortmode_path"`
39635      new_path="$input_path"
39636    fi
39637  fi
39638
39639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39640  if test "x$test_cygdrive_prefix" = x; then
39641    # As a simple fix, exclude /usr/bin since it's not a real path.
39642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39644      # a path prefixed by /cygdrive for fixpath to work.
39645      new_path="$CYGWIN_ROOT_PATH$input_path"
39646    fi
39647  fi
39648
39649  # remove trailing .exe if any
39650  new_path="${new_path/%.exe/}"
39651
39652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39653
39654  # First separate the path from the arguments. This will split at the first
39655  # space.
39656  complete="$MT"
39657  path="${complete%% *}"
39658  tmp="$complete EOL"
39659  arguments="${tmp#* }"
39660
39661  # Input might be given as Windows format, start by converting to
39662  # unix format.
39663  new_path="$path"
39664
39665  windows_path="$new_path"
39666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39667    unix_path=`$CYGPATH -u "$windows_path"`
39668    new_path="$unix_path"
39669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39671    new_path="$unix_path"
39672  fi
39673
39674
39675  # Now try to locate executable using which
39676  new_path=`$WHICH "$new_path" 2> /dev/null`
39677
39678  if test "x$new_path" = x; then
39679    # Oops. Which didn't find the executable.
39680    # The splitting of arguments from the executable at a space might have been incorrect,
39681    # since paths with space are more likely in Windows. Give it another try with the whole
39682    # argument.
39683    path="$complete"
39684    arguments="EOL"
39685    new_path="$path"
39686
39687  windows_path="$new_path"
39688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39689    unix_path=`$CYGPATH -u "$windows_path"`
39690    new_path="$unix_path"
39691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39693    new_path="$unix_path"
39694  fi
39695
39696
39697    new_path=`$WHICH "$new_path" 2> /dev/null`
39698    # bat and cmd files are not always considered executable in MSYS causing which
39699    # to not find them
39700    if test "x$new_path" = x \
39701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39703      new_path="$path"
39704
39705  windows_path="$new_path"
39706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39707    unix_path=`$CYGPATH -u "$windows_path"`
39708    new_path="$unix_path"
39709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39711    new_path="$unix_path"
39712  fi
39713
39714    fi
39715
39716    if test "x$new_path" = x; then
39717      # It's still not found. Now this is an unrecoverable error.
39718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39719$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39720      has_space=`$ECHO "$complete" | $GREP " "`
39721      if test "x$has_space" != x; then
39722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39724      fi
39725      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39726    fi
39727  fi
39728
39729  # Now new_path has a complete unix path to the binary
39730  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39731    # Keep paths in /bin as-is, but remove trailing .exe if any
39732    new_path="${new_path/%.exe/}"
39733    # Do not save /bin paths to all_fixpath_prefixes!
39734  else
39735    # Not in mixed or Windows style, start by that.
39736    new_path=`cmd //c echo $new_path`
39737
39738  input_path="$new_path"
39739  # Check if we need to convert this using DOS-style short mode. If the path
39740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39741  # take no chances and rewrite it.
39742  # Note: m4 eats our [], so we need to use [ and ] instead.
39743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39744  if test "x$has_forbidden_chars" != x; then
39745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39747  fi
39748
39749    # Output is in $new_path
39750
39751  windows_path="$new_path"
39752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39753    unix_path=`$CYGPATH -u "$windows_path"`
39754    new_path="$unix_path"
39755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39757    new_path="$unix_path"
39758  fi
39759
39760    # remove trailing .exe if any
39761    new_path="${new_path/%.exe/}"
39762
39763    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39764    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39765  fi
39766
39767    else
39768      # We're on a unix platform. Hooray! :)
39769      # First separate the path from the arguments. This will split at the first
39770      # space.
39771      complete="$MT"
39772      path="${complete%% *}"
39773      tmp="$complete EOL"
39774      arguments="${tmp#* }"
39775
39776      # Cannot rely on the command "which" here since it doesn't always work.
39777      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39778      if test -z "$is_absolute_path"; then
39779        # Path to executable is not absolute. Find it.
39780        IFS_save="$IFS"
39781        IFS=:
39782        for p in $PATH; do
39783          if test -f "$p/$path" && test -x "$p/$path"; then
39784            new_path="$p/$path"
39785            break
39786          fi
39787        done
39788        IFS="$IFS_save"
39789      else
39790        # This is an absolute path, we can use it without further modifications.
39791        new_path="$path"
39792      fi
39793
39794      if test "x$new_path" = x; then
39795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39796$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39797        has_space=`$ECHO "$complete" | $GREP " "`
39798        if test "x$has_space" != x; then
39799          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39800$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39801        fi
39802        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39803      fi
39804    fi
39805
39806    # Now join together the path and the arguments once again
39807    if test "x$arguments" != xEOL; then
39808      new_complete="$new_path ${arguments% *}"
39809    else
39810      new_complete="$new_path"
39811    fi
39812
39813    if test "x$complete" != "x$new_complete"; then
39814      MT="$new_complete"
39815      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39816$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39817    fi
39818  fi
39819
39820    # Setup the resource compiler (RC)
39821    # Extract the first word of "rc", so it can be a program name with args.
39822set dummy rc; ac_word=$2
39823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39824$as_echo_n "checking for $ac_word... " >&6; }
39825if ${ac_cv_prog_RC+:} false; then :
39826  $as_echo_n "(cached) " >&6
39827else
39828  if test -n "$RC"; then
39829  ac_cv_prog_RC="$RC" # Let the user override the test.
39830else
39831  ac_prog_rejected=no
39832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39833for as_dir in $PATH
39834do
39835  IFS=$as_save_IFS
39836  test -z "$as_dir" && as_dir=.
39837    for ac_exec_ext in '' $ac_executable_extensions; do
39838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39839    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39840       ac_prog_rejected=yes
39841       continue
39842     fi
39843    ac_cv_prog_RC="rc"
39844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39845    break 2
39846  fi
39847done
39848  done
39849IFS=$as_save_IFS
39850
39851if test $ac_prog_rejected = yes; then
39852  # We found a bogon in the path, so make sure we never use it.
39853  set dummy $ac_cv_prog_RC
39854  shift
39855  if test $# != 0; then
39856    # We chose a different compiler from the bogus one.
39857    # However, it has the same basename, so the bogon will be chosen
39858    # first if we set RC to just the basename; use the full file name.
39859    shift
39860    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39861  fi
39862fi
39863fi
39864fi
39865RC=$ac_cv_prog_RC
39866if test -n "$RC"; then
39867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39868$as_echo "$RC" >&6; }
39869else
39870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39871$as_echo "no" >&6; }
39872fi
39873
39874
39875
39876  # Only process if variable expands to non-empty
39877
39878  if test "x$RC" != x; then
39879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39880
39881  # First separate the path from the arguments. This will split at the first
39882  # space.
39883  complete="$RC"
39884  path="${complete%% *}"
39885  tmp="$complete EOL"
39886  arguments="${tmp#* }"
39887
39888  # Input might be given as Windows format, start by converting to
39889  # unix format.
39890  new_path=`$CYGPATH -u "$path"`
39891
39892  # Now try to locate executable using which
39893  new_path=`$WHICH "$new_path" 2> /dev/null`
39894  # bat and cmd files are not always considered executable in cygwin causing which
39895  # to not find them
39896  if test "x$new_path" = x \
39897      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39898      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39899    new_path=`$CYGPATH -u "$path"`
39900  fi
39901  if test "x$new_path" = x; then
39902    # Oops. Which didn't find the executable.
39903    # The splitting of arguments from the executable at a space might have been incorrect,
39904    # since paths with space are more likely in Windows. Give it another try with the whole
39905    # argument.
39906    path="$complete"
39907    arguments="EOL"
39908    new_path=`$CYGPATH -u "$path"`
39909    new_path=`$WHICH "$new_path" 2> /dev/null`
39910    # bat and cmd files are not always considered executable in cygwin causing which
39911    # to not find them
39912    if test "x$new_path" = x \
39913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39915      new_path=`$CYGPATH -u "$path"`
39916    fi
39917    if test "x$new_path" = x; then
39918      # It's still not found. Now this is an unrecoverable error.
39919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39920$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39921      has_space=`$ECHO "$complete" | $GREP " "`
39922      if test "x$has_space" != x; then
39923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39925      fi
39926      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39927    fi
39928  fi
39929
39930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39933  # "foo.exe" is OK but "foo" is an error.
39934  #
39935  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39936  # It is also a way to make sure we got the proper file name for the real test later on.
39937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39938  if test "x$test_shortpath" = x; then
39939    # Short path failed, file does not exist as specified.
39940    # Try adding .exe or .cmd
39941    if test -f "${new_path}.exe"; then
39942      input_to_shortpath="${new_path}.exe"
39943    elif test -f "${new_path}.cmd"; then
39944      input_to_shortpath="${new_path}.cmd"
39945    else
39946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39947$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39948      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39949$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39950      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39951    fi
39952  else
39953    input_to_shortpath="$new_path"
39954  fi
39955
39956  # Call helper function which possibly converts this using DOS-style short mode.
39957  # If so, the updated path is stored in $new_path.
39958  new_path="$input_to_shortpath"
39959
39960  input_path="$input_to_shortpath"
39961  # Check if we need to convert this using DOS-style short mode. If the path
39962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39963  # take no chances and rewrite it.
39964  # Note: m4 eats our [], so we need to use [ and ] instead.
39965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39966  if test "x$has_forbidden_chars" != x; then
39967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39971      # Going to short mode and back again did indeed matter. Since short mode is
39972      # case insensitive, let's make it lowercase to improve readability.
39973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39974      # Now convert it back to Unix-style (cygpath)
39975      input_path=`$CYGPATH -u "$shortmode_path"`
39976      new_path="$input_path"
39977    fi
39978  fi
39979
39980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39981  if test "x$test_cygdrive_prefix" = x; then
39982    # As a simple fix, exclude /usr/bin since it's not a real path.
39983    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39985      # a path prefixed by /cygdrive for fixpath to work.
39986      new_path="$CYGWIN_ROOT_PATH$input_path"
39987    fi
39988  fi
39989
39990  # remove trailing .exe if any
39991  new_path="${new_path/%.exe/}"
39992
39993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39994
39995  # First separate the path from the arguments. This will split at the first
39996  # space.
39997  complete="$RC"
39998  path="${complete%% *}"
39999  tmp="$complete EOL"
40000  arguments="${tmp#* }"
40001
40002  # Input might be given as Windows format, start by converting to
40003  # unix format.
40004  new_path="$path"
40005
40006  windows_path="$new_path"
40007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40008    unix_path=`$CYGPATH -u "$windows_path"`
40009    new_path="$unix_path"
40010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40012    new_path="$unix_path"
40013  fi
40014
40015
40016  # Now try to locate executable using which
40017  new_path=`$WHICH "$new_path" 2> /dev/null`
40018
40019  if test "x$new_path" = x; then
40020    # Oops. Which didn't find the executable.
40021    # The splitting of arguments from the executable at a space might have been incorrect,
40022    # since paths with space are more likely in Windows. Give it another try with the whole
40023    # argument.
40024    path="$complete"
40025    arguments="EOL"
40026    new_path="$path"
40027
40028  windows_path="$new_path"
40029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40030    unix_path=`$CYGPATH -u "$windows_path"`
40031    new_path="$unix_path"
40032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40034    new_path="$unix_path"
40035  fi
40036
40037
40038    new_path=`$WHICH "$new_path" 2> /dev/null`
40039    # bat and cmd files are not always considered executable in MSYS causing which
40040    # to not find them
40041    if test "x$new_path" = x \
40042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40044      new_path="$path"
40045
40046  windows_path="$new_path"
40047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40048    unix_path=`$CYGPATH -u "$windows_path"`
40049    new_path="$unix_path"
40050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40052    new_path="$unix_path"
40053  fi
40054
40055    fi
40056
40057    if test "x$new_path" = x; then
40058      # It's still not found. Now this is an unrecoverable error.
40059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40060$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40061      has_space=`$ECHO "$complete" | $GREP " "`
40062      if test "x$has_space" != x; then
40063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40065      fi
40066      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40067    fi
40068  fi
40069
40070  # Now new_path has a complete unix path to the binary
40071  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40072    # Keep paths in /bin as-is, but remove trailing .exe if any
40073    new_path="${new_path/%.exe/}"
40074    # Do not save /bin paths to all_fixpath_prefixes!
40075  else
40076    # Not in mixed or Windows style, start by that.
40077    new_path=`cmd //c echo $new_path`
40078
40079  input_path="$new_path"
40080  # Check if we need to convert this using DOS-style short mode. If the path
40081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40082  # take no chances and rewrite it.
40083  # Note: m4 eats our [], so we need to use [ and ] instead.
40084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40085  if test "x$has_forbidden_chars" != x; then
40086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40088  fi
40089
40090    # Output is in $new_path
40091
40092  windows_path="$new_path"
40093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40094    unix_path=`$CYGPATH -u "$windows_path"`
40095    new_path="$unix_path"
40096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40098    new_path="$unix_path"
40099  fi
40100
40101    # remove trailing .exe if any
40102    new_path="${new_path/%.exe/}"
40103
40104    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40105    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40106  fi
40107
40108    else
40109      # We're on a unix platform. Hooray! :)
40110      # First separate the path from the arguments. This will split at the first
40111      # space.
40112      complete="$RC"
40113      path="${complete%% *}"
40114      tmp="$complete EOL"
40115      arguments="${tmp#* }"
40116
40117      # Cannot rely on the command "which" here since it doesn't always work.
40118      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40119      if test -z "$is_absolute_path"; then
40120        # Path to executable is not absolute. Find it.
40121        IFS_save="$IFS"
40122        IFS=:
40123        for p in $PATH; do
40124          if test -f "$p/$path" && test -x "$p/$path"; then
40125            new_path="$p/$path"
40126            break
40127          fi
40128        done
40129        IFS="$IFS_save"
40130      else
40131        # This is an absolute path, we can use it without further modifications.
40132        new_path="$path"
40133      fi
40134
40135      if test "x$new_path" = x; then
40136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40137$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40138        has_space=`$ECHO "$complete" | $GREP " "`
40139        if test "x$has_space" != x; then
40140          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40141$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40142        fi
40143        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40144      fi
40145    fi
40146
40147    # Now join together the path and the arguments once again
40148    if test "x$arguments" != xEOL; then
40149      new_complete="$new_path ${arguments% *}"
40150    else
40151      new_complete="$new_path"
40152    fi
40153
40154    if test "x$complete" != "x$new_complete"; then
40155      RC="$new_complete"
40156      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40157$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40158    fi
40159  fi
40160
40161    # Extract the first word of "dumpbin", so it can be a program name with args.
40162set dummy dumpbin; ac_word=$2
40163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40164$as_echo_n "checking for $ac_word... " >&6; }
40165if ${ac_cv_prog_DUMPBIN+:} false; then :
40166  $as_echo_n "(cached) " >&6
40167else
40168  if test -n "$DUMPBIN"; then
40169  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40170else
40171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40172for as_dir in $PATH
40173do
40174  IFS=$as_save_IFS
40175  test -z "$as_dir" && as_dir=.
40176    for ac_exec_ext in '' $ac_executable_extensions; do
40177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40178    ac_cv_prog_DUMPBIN="dumpbin"
40179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40180    break 2
40181  fi
40182done
40183  done
40184IFS=$as_save_IFS
40185
40186fi
40187fi
40188DUMPBIN=$ac_cv_prog_DUMPBIN
40189if test -n "$DUMPBIN"; then
40190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40191$as_echo "$DUMPBIN" >&6; }
40192else
40193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40194$as_echo "no" >&6; }
40195fi
40196
40197
40198
40199  # Only process if variable expands to non-empty
40200
40201  if test "x$DUMPBIN" != x; then
40202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40203
40204  # First separate the path from the arguments. This will split at the first
40205  # space.
40206  complete="$DUMPBIN"
40207  path="${complete%% *}"
40208  tmp="$complete EOL"
40209  arguments="${tmp#* }"
40210
40211  # Input might be given as Windows format, start by converting to
40212  # unix format.
40213  new_path=`$CYGPATH -u "$path"`
40214
40215  # Now try to locate executable using which
40216  new_path=`$WHICH "$new_path" 2> /dev/null`
40217  # bat and cmd files are not always considered executable in cygwin causing which
40218  # to not find them
40219  if test "x$new_path" = x \
40220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40222    new_path=`$CYGPATH -u "$path"`
40223  fi
40224  if test "x$new_path" = x; then
40225    # Oops. Which didn't find the executable.
40226    # The splitting of arguments from the executable at a space might have been incorrect,
40227    # since paths with space are more likely in Windows. Give it another try with the whole
40228    # argument.
40229    path="$complete"
40230    arguments="EOL"
40231    new_path=`$CYGPATH -u "$path"`
40232    new_path=`$WHICH "$new_path" 2> /dev/null`
40233    # bat and cmd files are not always considered executable in cygwin causing which
40234    # to not find them
40235    if test "x$new_path" = x \
40236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40238      new_path=`$CYGPATH -u "$path"`
40239    fi
40240    if test "x$new_path" = x; then
40241      # It's still not found. Now this is an unrecoverable error.
40242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40243$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40244      has_space=`$ECHO "$complete" | $GREP " "`
40245      if test "x$has_space" != x; then
40246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40248      fi
40249      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40250    fi
40251  fi
40252
40253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40256  # "foo.exe" is OK but "foo" is an error.
40257  #
40258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40259  # It is also a way to make sure we got the proper file name for the real test later on.
40260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40261  if test "x$test_shortpath" = x; then
40262    # Short path failed, file does not exist as specified.
40263    # Try adding .exe or .cmd
40264    if test -f "${new_path}.exe"; then
40265      input_to_shortpath="${new_path}.exe"
40266    elif test -f "${new_path}.cmd"; then
40267      input_to_shortpath="${new_path}.cmd"
40268    else
40269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40270$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40273      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40274    fi
40275  else
40276    input_to_shortpath="$new_path"
40277  fi
40278
40279  # Call helper function which possibly converts this using DOS-style short mode.
40280  # If so, the updated path is stored in $new_path.
40281  new_path="$input_to_shortpath"
40282
40283  input_path="$input_to_shortpath"
40284  # Check if we need to convert this using DOS-style short mode. If the path
40285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40286  # take no chances and rewrite it.
40287  # Note: m4 eats our [], so we need to use [ and ] instead.
40288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40289  if test "x$has_forbidden_chars" != x; then
40290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40294      # Going to short mode and back again did indeed matter. Since short mode is
40295      # case insensitive, let's make it lowercase to improve readability.
40296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40297      # Now convert it back to Unix-style (cygpath)
40298      input_path=`$CYGPATH -u "$shortmode_path"`
40299      new_path="$input_path"
40300    fi
40301  fi
40302
40303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40304  if test "x$test_cygdrive_prefix" = x; then
40305    # As a simple fix, exclude /usr/bin since it's not a real path.
40306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40308      # a path prefixed by /cygdrive for fixpath to work.
40309      new_path="$CYGWIN_ROOT_PATH$input_path"
40310    fi
40311  fi
40312
40313  # remove trailing .exe if any
40314  new_path="${new_path/%.exe/}"
40315
40316    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40317
40318  # First separate the path from the arguments. This will split at the first
40319  # space.
40320  complete="$DUMPBIN"
40321  path="${complete%% *}"
40322  tmp="$complete EOL"
40323  arguments="${tmp#* }"
40324
40325  # Input might be given as Windows format, start by converting to
40326  # unix format.
40327  new_path="$path"
40328
40329  windows_path="$new_path"
40330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40331    unix_path=`$CYGPATH -u "$windows_path"`
40332    new_path="$unix_path"
40333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40335    new_path="$unix_path"
40336  fi
40337
40338
40339  # Now try to locate executable using which
40340  new_path=`$WHICH "$new_path" 2> /dev/null`
40341
40342  if test "x$new_path" = x; then
40343    # Oops. Which didn't find the executable.
40344    # The splitting of arguments from the executable at a space might have been incorrect,
40345    # since paths with space are more likely in Windows. Give it another try with the whole
40346    # argument.
40347    path="$complete"
40348    arguments="EOL"
40349    new_path="$path"
40350
40351  windows_path="$new_path"
40352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40353    unix_path=`$CYGPATH -u "$windows_path"`
40354    new_path="$unix_path"
40355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40357    new_path="$unix_path"
40358  fi
40359
40360
40361    new_path=`$WHICH "$new_path" 2> /dev/null`
40362    # bat and cmd files are not always considered executable in MSYS causing which
40363    # to not find them
40364    if test "x$new_path" = x \
40365        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40366        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40367      new_path="$path"
40368
40369  windows_path="$new_path"
40370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40371    unix_path=`$CYGPATH -u "$windows_path"`
40372    new_path="$unix_path"
40373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40375    new_path="$unix_path"
40376  fi
40377
40378    fi
40379
40380    if test "x$new_path" = x; then
40381      # It's still not found. Now this is an unrecoverable error.
40382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40383$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40384      has_space=`$ECHO "$complete" | $GREP " "`
40385      if test "x$has_space" != x; then
40386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40388      fi
40389      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40390    fi
40391  fi
40392
40393  # Now new_path has a complete unix path to the binary
40394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40395    # Keep paths in /bin as-is, but remove trailing .exe if any
40396    new_path="${new_path/%.exe/}"
40397    # Do not save /bin paths to all_fixpath_prefixes!
40398  else
40399    # Not in mixed or Windows style, start by that.
40400    new_path=`cmd //c echo $new_path`
40401
40402  input_path="$new_path"
40403  # Check if we need to convert this using DOS-style short mode. If the path
40404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40405  # take no chances and rewrite it.
40406  # Note: m4 eats our [], so we need to use [ and ] instead.
40407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40408  if test "x$has_forbidden_chars" != x; then
40409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40411  fi
40412
40413    # Output is in $new_path
40414
40415  windows_path="$new_path"
40416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40417    unix_path=`$CYGPATH -u "$windows_path"`
40418    new_path="$unix_path"
40419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40421    new_path="$unix_path"
40422  fi
40423
40424    # remove trailing .exe if any
40425    new_path="${new_path/%.exe/}"
40426
40427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40429  fi
40430
40431    else
40432      # We're on a unix platform. Hooray! :)
40433      # First separate the path from the arguments. This will split at the first
40434      # space.
40435      complete="$DUMPBIN"
40436      path="${complete%% *}"
40437      tmp="$complete EOL"
40438      arguments="${tmp#* }"
40439
40440      # Cannot rely on the command "which" here since it doesn't always work.
40441      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40442      if test -z "$is_absolute_path"; then
40443        # Path to executable is not absolute. Find it.
40444        IFS_save="$IFS"
40445        IFS=:
40446        for p in $PATH; do
40447          if test -f "$p/$path" && test -x "$p/$path"; then
40448            new_path="$p/$path"
40449            break
40450          fi
40451        done
40452        IFS="$IFS_save"
40453      else
40454        # This is an absolute path, we can use it without further modifications.
40455        new_path="$path"
40456      fi
40457
40458      if test "x$new_path" = x; then
40459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40460$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40461        has_space=`$ECHO "$complete" | $GREP " "`
40462        if test "x$has_space" != x; then
40463          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40464$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40465        fi
40466        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40467      fi
40468    fi
40469
40470    # Now join together the path and the arguments once again
40471    if test "x$arguments" != xEOL; then
40472      new_complete="$new_path ${arguments% *}"
40473    else
40474      new_complete="$new_path"
40475    fi
40476
40477    if test "x$complete" != "x$new_complete"; then
40478      DUMPBIN="$new_complete"
40479      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40480$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40481    fi
40482  fi
40483
40484    # We need to check for 'msbuild.exe' because at the place where we expect to
40485    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40486    # won't find the 'msbuild.exe' executable in that case (and the
40487    # 'ac_executable_extensions' is unusable due to performance reasons).
40488    # Notice that we intentionally don't fix up the path to MSBUILD because we
40489    # will call it in a DOS shell during freetype detection on Windows (see
40490    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40491    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40492set dummy msbuild.exe; ac_word=$2
40493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40494$as_echo_n "checking for $ac_word... " >&6; }
40495if ${ac_cv_prog_MSBUILD+:} false; then :
40496  $as_echo_n "(cached) " >&6
40497else
40498  if test -n "$MSBUILD"; then
40499  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40500else
40501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40502for as_dir in $PATH
40503do
40504  IFS=$as_save_IFS
40505  test -z "$as_dir" && as_dir=.
40506    for ac_exec_ext in '' $ac_executable_extensions; do
40507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40508    ac_cv_prog_MSBUILD="msbuild.exe"
40509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40510    break 2
40511  fi
40512done
40513  done
40514IFS=$as_save_IFS
40515
40516fi
40517fi
40518MSBUILD=$ac_cv_prog_MSBUILD
40519if test -n "$MSBUILD"; then
40520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40521$as_echo "$MSBUILD" >&6; }
40522else
40523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40524$as_echo "no" >&6; }
40525fi
40526
40527
40528  fi
40529
40530  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40531
40532
40533  # Publish this variable in the help.
40534
40535
40536  if [ -z "${STRIP+x}" ]; then
40537    # The variable is not set by user, try to locate tool using the code snippet
40538    for ac_prog in strip
40539do
40540  # Extract the first word of "$ac_prog", so it can be a program name with args.
40541set dummy $ac_prog; ac_word=$2
40542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40543$as_echo_n "checking for $ac_word... " >&6; }
40544if ${ac_cv_path_STRIP+:} false; then :
40545  $as_echo_n "(cached) " >&6
40546else
40547  case $STRIP in
40548  [\\/]* | ?:[\\/]*)
40549  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40550  ;;
40551  *)
40552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40553for as_dir in $PATH
40554do
40555  IFS=$as_save_IFS
40556  test -z "$as_dir" && as_dir=.
40557    for ac_exec_ext in '' $ac_executable_extensions; do
40558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40559    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40561    break 2
40562  fi
40563done
40564  done
40565IFS=$as_save_IFS
40566
40567  ;;
40568esac
40569fi
40570STRIP=$ac_cv_path_STRIP
40571if test -n "$STRIP"; then
40572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40573$as_echo "$STRIP" >&6; }
40574else
40575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40576$as_echo "no" >&6; }
40577fi
40578
40579
40580  test -n "$STRIP" && break
40581done
40582
40583  else
40584    # The variable is set, but is it from the command line or the environment?
40585
40586    # Try to remove the string !STRIP! from our list.
40587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40589      # If it failed, the variable was not from the command line. Ignore it,
40590      # but warn the user (except for BASH, which is always set by the calling BASH).
40591      if test "xSTRIP" != xBASH; then
40592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40593$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40594      fi
40595      # Try to locate tool using the code snippet
40596      for ac_prog in strip
40597do
40598  # Extract the first word of "$ac_prog", so it can be a program name with args.
40599set dummy $ac_prog; ac_word=$2
40600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40601$as_echo_n "checking for $ac_word... " >&6; }
40602if ${ac_cv_path_STRIP+:} false; then :
40603  $as_echo_n "(cached) " >&6
40604else
40605  case $STRIP in
40606  [\\/]* | ?:[\\/]*)
40607  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40608  ;;
40609  *)
40610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40611for as_dir in $PATH
40612do
40613  IFS=$as_save_IFS
40614  test -z "$as_dir" && as_dir=.
40615    for ac_exec_ext in '' $ac_executable_extensions; do
40616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40617    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40619    break 2
40620  fi
40621done
40622  done
40623IFS=$as_save_IFS
40624
40625  ;;
40626esac
40627fi
40628STRIP=$ac_cv_path_STRIP
40629if test -n "$STRIP"; then
40630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40631$as_echo "$STRIP" >&6; }
40632else
40633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40634$as_echo "no" >&6; }
40635fi
40636
40637
40638  test -n "$STRIP" && break
40639done
40640
40641    else
40642      # If it succeeded, then it was overridden by the user. We will use it
40643      # for the tool.
40644
40645      # First remove it from the list of overridden variables, so we can test
40646      # for unknown variables in the end.
40647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40648
40649      # Check if we try to supply an empty value
40650      if test "x$STRIP" = x; then
40651        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40652$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40654$as_echo_n "checking for STRIP... " >&6; }
40655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40656$as_echo "disabled" >&6; }
40657      else
40658        # Check if the provided tool contains a complete path.
40659        tool_specified="$STRIP"
40660        tool_basename="${tool_specified##*/}"
40661        if test "x$tool_basename" = "x$tool_specified"; then
40662          # A command without a complete path is provided, search $PATH.
40663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40664$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40665          # Extract the first word of "$tool_basename", so it can be a program name with args.
40666set dummy $tool_basename; ac_word=$2
40667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40668$as_echo_n "checking for $ac_word... " >&6; }
40669if ${ac_cv_path_STRIP+:} false; then :
40670  $as_echo_n "(cached) " >&6
40671else
40672  case $STRIP in
40673  [\\/]* | ?:[\\/]*)
40674  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40675  ;;
40676  *)
40677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40678for as_dir in $PATH
40679do
40680  IFS=$as_save_IFS
40681  test -z "$as_dir" && as_dir=.
40682    for ac_exec_ext in '' $ac_executable_extensions; do
40683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40684    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40686    break 2
40687  fi
40688done
40689  done
40690IFS=$as_save_IFS
40691
40692  ;;
40693esac
40694fi
40695STRIP=$ac_cv_path_STRIP
40696if test -n "$STRIP"; then
40697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40698$as_echo "$STRIP" >&6; }
40699else
40700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40701$as_echo "no" >&6; }
40702fi
40703
40704
40705          if test "x$STRIP" = x; then
40706            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40707          fi
40708        else
40709          # Otherwise we believe it is a complete path. Use it as it is.
40710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40711$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40712          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40713$as_echo_n "checking for STRIP... " >&6; }
40714          if test ! -x "$tool_specified"; then
40715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40716$as_echo "not found" >&6; }
40717            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40718          fi
40719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40720$as_echo "$tool_specified" >&6; }
40721        fi
40722      fi
40723    fi
40724
40725  fi
40726
40727
40728
40729  # Only process if variable expands to non-empty
40730
40731  if test "x$STRIP" != x; then
40732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40733
40734  # First separate the path from the arguments. This will split at the first
40735  # space.
40736  complete="$STRIP"
40737  path="${complete%% *}"
40738  tmp="$complete EOL"
40739  arguments="${tmp#* }"
40740
40741  # Input might be given as Windows format, start by converting to
40742  # unix format.
40743  new_path=`$CYGPATH -u "$path"`
40744
40745  # Now try to locate executable using which
40746  new_path=`$WHICH "$new_path" 2> /dev/null`
40747  # bat and cmd files are not always considered executable in cygwin causing which
40748  # to not find them
40749  if test "x$new_path" = x \
40750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40752    new_path=`$CYGPATH -u "$path"`
40753  fi
40754  if test "x$new_path" = x; then
40755    # Oops. Which didn't find the executable.
40756    # The splitting of arguments from the executable at a space might have been incorrect,
40757    # since paths with space are more likely in Windows. Give it another try with the whole
40758    # argument.
40759    path="$complete"
40760    arguments="EOL"
40761    new_path=`$CYGPATH -u "$path"`
40762    new_path=`$WHICH "$new_path" 2> /dev/null`
40763    # bat and cmd files are not always considered executable in cygwin causing which
40764    # to not find them
40765    if test "x$new_path" = x \
40766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40768      new_path=`$CYGPATH -u "$path"`
40769    fi
40770    if test "x$new_path" = x; then
40771      # It's still not found. Now this is an unrecoverable error.
40772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40773$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40774      has_space=`$ECHO "$complete" | $GREP " "`
40775      if test "x$has_space" != x; then
40776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40778      fi
40779      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40780    fi
40781  fi
40782
40783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40786  # "foo.exe" is OK but "foo" is an error.
40787  #
40788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40789  # It is also a way to make sure we got the proper file name for the real test later on.
40790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40791  if test "x$test_shortpath" = x; then
40792    # Short path failed, file does not exist as specified.
40793    # Try adding .exe or .cmd
40794    if test -f "${new_path}.exe"; then
40795      input_to_shortpath="${new_path}.exe"
40796    elif test -f "${new_path}.cmd"; then
40797      input_to_shortpath="${new_path}.cmd"
40798    else
40799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40800$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40803      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40804    fi
40805  else
40806    input_to_shortpath="$new_path"
40807  fi
40808
40809  # Call helper function which possibly converts this using DOS-style short mode.
40810  # If so, the updated path is stored in $new_path.
40811  new_path="$input_to_shortpath"
40812
40813  input_path="$input_to_shortpath"
40814  # Check if we need to convert this using DOS-style short mode. If the path
40815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40816  # take no chances and rewrite it.
40817  # Note: m4 eats our [], so we need to use [ and ] instead.
40818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40819  if test "x$has_forbidden_chars" != x; then
40820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40824      # Going to short mode and back again did indeed matter. Since short mode is
40825      # case insensitive, let's make it lowercase to improve readability.
40826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40827      # Now convert it back to Unix-style (cygpath)
40828      input_path=`$CYGPATH -u "$shortmode_path"`
40829      new_path="$input_path"
40830    fi
40831  fi
40832
40833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40834  if test "x$test_cygdrive_prefix" = x; then
40835    # As a simple fix, exclude /usr/bin since it's not a real path.
40836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40838      # a path prefixed by /cygdrive for fixpath to work.
40839      new_path="$CYGWIN_ROOT_PATH$input_path"
40840    fi
40841  fi
40842
40843  # remove trailing .exe if any
40844  new_path="${new_path/%.exe/}"
40845
40846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40847
40848  # First separate the path from the arguments. This will split at the first
40849  # space.
40850  complete="$STRIP"
40851  path="${complete%% *}"
40852  tmp="$complete EOL"
40853  arguments="${tmp#* }"
40854
40855  # Input might be given as Windows format, start by converting to
40856  # unix format.
40857  new_path="$path"
40858
40859  windows_path="$new_path"
40860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40861    unix_path=`$CYGPATH -u "$windows_path"`
40862    new_path="$unix_path"
40863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40865    new_path="$unix_path"
40866  fi
40867
40868
40869  # Now try to locate executable using which
40870  new_path=`$WHICH "$new_path" 2> /dev/null`
40871
40872  if test "x$new_path" = x; then
40873    # Oops. Which didn't find the executable.
40874    # The splitting of arguments from the executable at a space might have been incorrect,
40875    # since paths with space are more likely in Windows. Give it another try with the whole
40876    # argument.
40877    path="$complete"
40878    arguments="EOL"
40879    new_path="$path"
40880
40881  windows_path="$new_path"
40882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40883    unix_path=`$CYGPATH -u "$windows_path"`
40884    new_path="$unix_path"
40885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40887    new_path="$unix_path"
40888  fi
40889
40890
40891    new_path=`$WHICH "$new_path" 2> /dev/null`
40892    # bat and cmd files are not always considered executable in MSYS causing which
40893    # to not find them
40894    if test "x$new_path" = x \
40895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40897      new_path="$path"
40898
40899  windows_path="$new_path"
40900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40901    unix_path=`$CYGPATH -u "$windows_path"`
40902    new_path="$unix_path"
40903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40905    new_path="$unix_path"
40906  fi
40907
40908    fi
40909
40910    if test "x$new_path" = x; then
40911      # It's still not found. Now this is an unrecoverable error.
40912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40913$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40914      has_space=`$ECHO "$complete" | $GREP " "`
40915      if test "x$has_space" != x; then
40916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40918      fi
40919      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40920    fi
40921  fi
40922
40923  # Now new_path has a complete unix path to the binary
40924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40925    # Keep paths in /bin as-is, but remove trailing .exe if any
40926    new_path="${new_path/%.exe/}"
40927    # Do not save /bin paths to all_fixpath_prefixes!
40928  else
40929    # Not in mixed or Windows style, start by that.
40930    new_path=`cmd //c echo $new_path`
40931
40932  input_path="$new_path"
40933  # Check if we need to convert this using DOS-style short mode. If the path
40934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40935  # take no chances and rewrite it.
40936  # Note: m4 eats our [], so we need to use [ and ] instead.
40937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40938  if test "x$has_forbidden_chars" != x; then
40939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40941  fi
40942
40943    # Output is in $new_path
40944
40945  windows_path="$new_path"
40946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40947    unix_path=`$CYGPATH -u "$windows_path"`
40948    new_path="$unix_path"
40949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40951    new_path="$unix_path"
40952  fi
40953
40954    # remove trailing .exe if any
40955    new_path="${new_path/%.exe/}"
40956
40957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40959  fi
40960
40961    else
40962      # We're on a unix platform. Hooray! :)
40963      # First separate the path from the arguments. This will split at the first
40964      # space.
40965      complete="$STRIP"
40966      path="${complete%% *}"
40967      tmp="$complete EOL"
40968      arguments="${tmp#* }"
40969
40970      # Cannot rely on the command "which" here since it doesn't always work.
40971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40972      if test -z "$is_absolute_path"; then
40973        # Path to executable is not absolute. Find it.
40974        IFS_save="$IFS"
40975        IFS=:
40976        for p in $PATH; do
40977          if test -f "$p/$path" && test -x "$p/$path"; then
40978            new_path="$p/$path"
40979            break
40980          fi
40981        done
40982        IFS="$IFS_save"
40983      else
40984        # This is an absolute path, we can use it without further modifications.
40985        new_path="$path"
40986      fi
40987
40988      if test "x$new_path" = x; then
40989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40990$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40991        has_space=`$ECHO "$complete" | $GREP " "`
40992        if test "x$has_space" != x; then
40993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40995        fi
40996        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40997      fi
40998    fi
40999
41000    # Now join together the path and the arguments once again
41001    if test "x$arguments" != xEOL; then
41002      new_complete="$new_path ${arguments% *}"
41003    else
41004      new_complete="$new_path"
41005    fi
41006
41007    if test "x$complete" != "x$new_complete"; then
41008      STRIP="$new_complete"
41009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41010$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41011    fi
41012  fi
41013
41014
41015
41016  # Publish this variable in the help.
41017
41018
41019  if [ -z "${NM+x}" ]; then
41020    # The variable is not set by user, try to locate tool using the code snippet
41021    for ac_prog in nm
41022do
41023  # Extract the first word of "$ac_prog", so it can be a program name with args.
41024set dummy $ac_prog; ac_word=$2
41025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41026$as_echo_n "checking for $ac_word... " >&6; }
41027if ${ac_cv_path_NM+:} false; then :
41028  $as_echo_n "(cached) " >&6
41029else
41030  case $NM in
41031  [\\/]* | ?:[\\/]*)
41032  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41033  ;;
41034  *)
41035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41036for as_dir in $PATH
41037do
41038  IFS=$as_save_IFS
41039  test -z "$as_dir" && as_dir=.
41040    for ac_exec_ext in '' $ac_executable_extensions; do
41041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41042    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41044    break 2
41045  fi
41046done
41047  done
41048IFS=$as_save_IFS
41049
41050  ;;
41051esac
41052fi
41053NM=$ac_cv_path_NM
41054if test -n "$NM"; then
41055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41056$as_echo "$NM" >&6; }
41057else
41058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41059$as_echo "no" >&6; }
41060fi
41061
41062
41063  test -n "$NM" && break
41064done
41065
41066  else
41067    # The variable is set, but is it from the command line or the environment?
41068
41069    # Try to remove the string !NM! from our list.
41070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41072      # If it failed, the variable was not from the command line. Ignore it,
41073      # but warn the user (except for BASH, which is always set by the calling BASH).
41074      if test "xNM" != xBASH; then
41075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41076$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41077      fi
41078      # Try to locate tool using the code snippet
41079      for ac_prog in nm
41080do
41081  # Extract the first word of "$ac_prog", so it can be a program name with args.
41082set dummy $ac_prog; ac_word=$2
41083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41084$as_echo_n "checking for $ac_word... " >&6; }
41085if ${ac_cv_path_NM+:} false; then :
41086  $as_echo_n "(cached) " >&6
41087else
41088  case $NM in
41089  [\\/]* | ?:[\\/]*)
41090  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41091  ;;
41092  *)
41093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41094for as_dir in $PATH
41095do
41096  IFS=$as_save_IFS
41097  test -z "$as_dir" && as_dir=.
41098    for ac_exec_ext in '' $ac_executable_extensions; do
41099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41100    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41102    break 2
41103  fi
41104done
41105  done
41106IFS=$as_save_IFS
41107
41108  ;;
41109esac
41110fi
41111NM=$ac_cv_path_NM
41112if test -n "$NM"; then
41113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41114$as_echo "$NM" >&6; }
41115else
41116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41117$as_echo "no" >&6; }
41118fi
41119
41120
41121  test -n "$NM" && break
41122done
41123
41124    else
41125      # If it succeeded, then it was overridden by the user. We will use it
41126      # for the tool.
41127
41128      # First remove it from the list of overridden variables, so we can test
41129      # for unknown variables in the end.
41130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41131
41132      # Check if we try to supply an empty value
41133      if test "x$NM" = x; then
41134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41135$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41137$as_echo_n "checking for NM... " >&6; }
41138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41139$as_echo "disabled" >&6; }
41140      else
41141        # Check if the provided tool contains a complete path.
41142        tool_specified="$NM"
41143        tool_basename="${tool_specified##*/}"
41144        if test "x$tool_basename" = "x$tool_specified"; then
41145          # A command without a complete path is provided, search $PATH.
41146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41147$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41148          # Extract the first word of "$tool_basename", so it can be a program name with args.
41149set dummy $tool_basename; ac_word=$2
41150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41151$as_echo_n "checking for $ac_word... " >&6; }
41152if ${ac_cv_path_NM+:} false; then :
41153  $as_echo_n "(cached) " >&6
41154else
41155  case $NM in
41156  [\\/]* | ?:[\\/]*)
41157  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41158  ;;
41159  *)
41160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41161for as_dir in $PATH
41162do
41163  IFS=$as_save_IFS
41164  test -z "$as_dir" && as_dir=.
41165    for ac_exec_ext in '' $ac_executable_extensions; do
41166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41167    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41169    break 2
41170  fi
41171done
41172  done
41173IFS=$as_save_IFS
41174
41175  ;;
41176esac
41177fi
41178NM=$ac_cv_path_NM
41179if test -n "$NM"; then
41180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41181$as_echo "$NM" >&6; }
41182else
41183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41184$as_echo "no" >&6; }
41185fi
41186
41187
41188          if test "x$NM" = x; then
41189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41190          fi
41191        else
41192          # Otherwise we believe it is a complete path. Use it as it is.
41193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41194$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41196$as_echo_n "checking for NM... " >&6; }
41197          if test ! -x "$tool_specified"; then
41198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41199$as_echo "not found" >&6; }
41200            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41201          fi
41202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41203$as_echo "$tool_specified" >&6; }
41204        fi
41205      fi
41206    fi
41207
41208  fi
41209
41210
41211
41212  # Only process if variable expands to non-empty
41213
41214  if test "x$NM" != x; then
41215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41216
41217  # First separate the path from the arguments. This will split at the first
41218  # space.
41219  complete="$NM"
41220  path="${complete%% *}"
41221  tmp="$complete EOL"
41222  arguments="${tmp#* }"
41223
41224  # Input might be given as Windows format, start by converting to
41225  # unix format.
41226  new_path=`$CYGPATH -u "$path"`
41227
41228  # Now try to locate executable using which
41229  new_path=`$WHICH "$new_path" 2> /dev/null`
41230  # bat and cmd files are not always considered executable in cygwin causing which
41231  # to not find them
41232  if test "x$new_path" = x \
41233      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41234      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41235    new_path=`$CYGPATH -u "$path"`
41236  fi
41237  if test "x$new_path" = x; then
41238    # Oops. Which didn't find the executable.
41239    # The splitting of arguments from the executable at a space might have been incorrect,
41240    # since paths with space are more likely in Windows. Give it another try with the whole
41241    # argument.
41242    path="$complete"
41243    arguments="EOL"
41244    new_path=`$CYGPATH -u "$path"`
41245    new_path=`$WHICH "$new_path" 2> /dev/null`
41246    # bat and cmd files are not always considered executable in cygwin causing which
41247    # to not find them
41248    if test "x$new_path" = x \
41249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41251      new_path=`$CYGPATH -u "$path"`
41252    fi
41253    if test "x$new_path" = x; then
41254      # It's still not found. Now this is an unrecoverable error.
41255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41256$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41257      has_space=`$ECHO "$complete" | $GREP " "`
41258      if test "x$has_space" != x; then
41259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41261      fi
41262      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41263    fi
41264  fi
41265
41266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41269  # "foo.exe" is OK but "foo" is an error.
41270  #
41271  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41272  # It is also a way to make sure we got the proper file name for the real test later on.
41273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41274  if test "x$test_shortpath" = x; then
41275    # Short path failed, file does not exist as specified.
41276    # Try adding .exe or .cmd
41277    if test -f "${new_path}.exe"; then
41278      input_to_shortpath="${new_path}.exe"
41279    elif test -f "${new_path}.cmd"; then
41280      input_to_shortpath="${new_path}.cmd"
41281    else
41282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41283$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41284      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41285$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41286      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41287    fi
41288  else
41289    input_to_shortpath="$new_path"
41290  fi
41291
41292  # Call helper function which possibly converts this using DOS-style short mode.
41293  # If so, the updated path is stored in $new_path.
41294  new_path="$input_to_shortpath"
41295
41296  input_path="$input_to_shortpath"
41297  # Check if we need to convert this using DOS-style short mode. If the path
41298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41299  # take no chances and rewrite it.
41300  # Note: m4 eats our [], so we need to use [ and ] instead.
41301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41302  if test "x$has_forbidden_chars" != x; then
41303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41307      # Going to short mode and back again did indeed matter. Since short mode is
41308      # case insensitive, let's make it lowercase to improve readability.
41309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41310      # Now convert it back to Unix-style (cygpath)
41311      input_path=`$CYGPATH -u "$shortmode_path"`
41312      new_path="$input_path"
41313    fi
41314  fi
41315
41316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41317  if test "x$test_cygdrive_prefix" = x; then
41318    # As a simple fix, exclude /usr/bin since it's not a real path.
41319    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41321      # a path prefixed by /cygdrive for fixpath to work.
41322      new_path="$CYGWIN_ROOT_PATH$input_path"
41323    fi
41324  fi
41325
41326  # remove trailing .exe if any
41327  new_path="${new_path/%.exe/}"
41328
41329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41330
41331  # First separate the path from the arguments. This will split at the first
41332  # space.
41333  complete="$NM"
41334  path="${complete%% *}"
41335  tmp="$complete EOL"
41336  arguments="${tmp#* }"
41337
41338  # Input might be given as Windows format, start by converting to
41339  # unix format.
41340  new_path="$path"
41341
41342  windows_path="$new_path"
41343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41344    unix_path=`$CYGPATH -u "$windows_path"`
41345    new_path="$unix_path"
41346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41348    new_path="$unix_path"
41349  fi
41350
41351
41352  # Now try to locate executable using which
41353  new_path=`$WHICH "$new_path" 2> /dev/null`
41354
41355  if test "x$new_path" = x; then
41356    # Oops. Which didn't find the executable.
41357    # The splitting of arguments from the executable at a space might have been incorrect,
41358    # since paths with space are more likely in Windows. Give it another try with the whole
41359    # argument.
41360    path="$complete"
41361    arguments="EOL"
41362    new_path="$path"
41363
41364  windows_path="$new_path"
41365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41366    unix_path=`$CYGPATH -u "$windows_path"`
41367    new_path="$unix_path"
41368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41370    new_path="$unix_path"
41371  fi
41372
41373
41374    new_path=`$WHICH "$new_path" 2> /dev/null`
41375    # bat and cmd files are not always considered executable in MSYS causing which
41376    # to not find them
41377    if test "x$new_path" = x \
41378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41380      new_path="$path"
41381
41382  windows_path="$new_path"
41383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41384    unix_path=`$CYGPATH -u "$windows_path"`
41385    new_path="$unix_path"
41386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41388    new_path="$unix_path"
41389  fi
41390
41391    fi
41392
41393    if test "x$new_path" = x; then
41394      # It's still not found. Now this is an unrecoverable error.
41395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41396$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41397      has_space=`$ECHO "$complete" | $GREP " "`
41398      if test "x$has_space" != x; then
41399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41401      fi
41402      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41403    fi
41404  fi
41405
41406  # Now new_path has a complete unix path to the binary
41407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41408    # Keep paths in /bin as-is, but remove trailing .exe if any
41409    new_path="${new_path/%.exe/}"
41410    # Do not save /bin paths to all_fixpath_prefixes!
41411  else
41412    # Not in mixed or Windows style, start by that.
41413    new_path=`cmd //c echo $new_path`
41414
41415  input_path="$new_path"
41416  # Check if we need to convert this using DOS-style short mode. If the path
41417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41418  # take no chances and rewrite it.
41419  # Note: m4 eats our [], so we need to use [ and ] instead.
41420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41421  if test "x$has_forbidden_chars" != x; then
41422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41424  fi
41425
41426    # Output is in $new_path
41427
41428  windows_path="$new_path"
41429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41430    unix_path=`$CYGPATH -u "$windows_path"`
41431    new_path="$unix_path"
41432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41434    new_path="$unix_path"
41435  fi
41436
41437    # remove trailing .exe if any
41438    new_path="${new_path/%.exe/}"
41439
41440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41442  fi
41443
41444    else
41445      # We're on a unix platform. Hooray! :)
41446      # First separate the path from the arguments. This will split at the first
41447      # space.
41448      complete="$NM"
41449      path="${complete%% *}"
41450      tmp="$complete EOL"
41451      arguments="${tmp#* }"
41452
41453      # Cannot rely on the command "which" here since it doesn't always work.
41454      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41455      if test -z "$is_absolute_path"; then
41456        # Path to executable is not absolute. Find it.
41457        IFS_save="$IFS"
41458        IFS=:
41459        for p in $PATH; do
41460          if test -f "$p/$path" && test -x "$p/$path"; then
41461            new_path="$p/$path"
41462            break
41463          fi
41464        done
41465        IFS="$IFS_save"
41466      else
41467        # This is an absolute path, we can use it without further modifications.
41468        new_path="$path"
41469      fi
41470
41471      if test "x$new_path" = x; then
41472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41473$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41474        has_space=`$ECHO "$complete" | $GREP " "`
41475        if test "x$has_space" != x; then
41476          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41478        fi
41479        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41480      fi
41481    fi
41482
41483    # Now join together the path and the arguments once again
41484    if test "x$arguments" != xEOL; then
41485      new_complete="$new_path ${arguments% *}"
41486    else
41487      new_complete="$new_path"
41488    fi
41489
41490    if test "x$complete" != "x$new_complete"; then
41491      NM="$new_complete"
41492      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41493$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41494    fi
41495  fi
41496
41497
41498
41499  # Publish this variable in the help.
41500
41501
41502  if [ -z "${GNM+x}" ]; then
41503    # The variable is not set by user, try to locate tool using the code snippet
41504    for ac_prog in gnm
41505do
41506  # Extract the first word of "$ac_prog", so it can be a program name with args.
41507set dummy $ac_prog; ac_word=$2
41508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41509$as_echo_n "checking for $ac_word... " >&6; }
41510if ${ac_cv_path_GNM+:} false; then :
41511  $as_echo_n "(cached) " >&6
41512else
41513  case $GNM in
41514  [\\/]* | ?:[\\/]*)
41515  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41516  ;;
41517  *)
41518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41519for as_dir in $PATH
41520do
41521  IFS=$as_save_IFS
41522  test -z "$as_dir" && as_dir=.
41523    for ac_exec_ext in '' $ac_executable_extensions; do
41524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41525    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41527    break 2
41528  fi
41529done
41530  done
41531IFS=$as_save_IFS
41532
41533  ;;
41534esac
41535fi
41536GNM=$ac_cv_path_GNM
41537if test -n "$GNM"; then
41538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41539$as_echo "$GNM" >&6; }
41540else
41541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41542$as_echo "no" >&6; }
41543fi
41544
41545
41546  test -n "$GNM" && break
41547done
41548
41549  else
41550    # The variable is set, but is it from the command line or the environment?
41551
41552    # Try to remove the string !GNM! from our list.
41553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41555      # If it failed, the variable was not from the command line. Ignore it,
41556      # but warn the user (except for BASH, which is always set by the calling BASH).
41557      if test "xGNM" != xBASH; then
41558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41559$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41560      fi
41561      # Try to locate tool using the code snippet
41562      for ac_prog in gnm
41563do
41564  # Extract the first word of "$ac_prog", so it can be a program name with args.
41565set dummy $ac_prog; ac_word=$2
41566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41567$as_echo_n "checking for $ac_word... " >&6; }
41568if ${ac_cv_path_GNM+:} false; then :
41569  $as_echo_n "(cached) " >&6
41570else
41571  case $GNM in
41572  [\\/]* | ?:[\\/]*)
41573  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41574  ;;
41575  *)
41576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41577for as_dir in $PATH
41578do
41579  IFS=$as_save_IFS
41580  test -z "$as_dir" && as_dir=.
41581    for ac_exec_ext in '' $ac_executable_extensions; do
41582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41583    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41585    break 2
41586  fi
41587done
41588  done
41589IFS=$as_save_IFS
41590
41591  ;;
41592esac
41593fi
41594GNM=$ac_cv_path_GNM
41595if test -n "$GNM"; then
41596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41597$as_echo "$GNM" >&6; }
41598else
41599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41600$as_echo "no" >&6; }
41601fi
41602
41603
41604  test -n "$GNM" && break
41605done
41606
41607    else
41608      # If it succeeded, then it was overridden by the user. We will use it
41609      # for the tool.
41610
41611      # First remove it from the list of overridden variables, so we can test
41612      # for unknown variables in the end.
41613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41614
41615      # Check if we try to supply an empty value
41616      if test "x$GNM" = x; then
41617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41618$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41620$as_echo_n "checking for GNM... " >&6; }
41621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41622$as_echo "disabled" >&6; }
41623      else
41624        # Check if the provided tool contains a complete path.
41625        tool_specified="$GNM"
41626        tool_basename="${tool_specified##*/}"
41627        if test "x$tool_basename" = "x$tool_specified"; then
41628          # A command without a complete path is provided, search $PATH.
41629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41630$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41631          # Extract the first word of "$tool_basename", so it can be a program name with args.
41632set dummy $tool_basename; ac_word=$2
41633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41634$as_echo_n "checking for $ac_word... " >&6; }
41635if ${ac_cv_path_GNM+:} false; then :
41636  $as_echo_n "(cached) " >&6
41637else
41638  case $GNM in
41639  [\\/]* | ?:[\\/]*)
41640  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41641  ;;
41642  *)
41643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41644for as_dir in $PATH
41645do
41646  IFS=$as_save_IFS
41647  test -z "$as_dir" && as_dir=.
41648    for ac_exec_ext in '' $ac_executable_extensions; do
41649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41650    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41652    break 2
41653  fi
41654done
41655  done
41656IFS=$as_save_IFS
41657
41658  ;;
41659esac
41660fi
41661GNM=$ac_cv_path_GNM
41662if test -n "$GNM"; then
41663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41664$as_echo "$GNM" >&6; }
41665else
41666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41667$as_echo "no" >&6; }
41668fi
41669
41670
41671          if test "x$GNM" = x; then
41672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41673          fi
41674        else
41675          # Otherwise we believe it is a complete path. Use it as it is.
41676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41677$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41679$as_echo_n "checking for GNM... " >&6; }
41680          if test ! -x "$tool_specified"; then
41681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41682$as_echo "not found" >&6; }
41683            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41684          fi
41685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41686$as_echo "$tool_specified" >&6; }
41687        fi
41688      fi
41689    fi
41690
41691  fi
41692
41693
41694
41695  # Only process if variable expands to non-empty
41696
41697  if test "x$GNM" != x; then
41698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41699
41700  # First separate the path from the arguments. This will split at the first
41701  # space.
41702  complete="$GNM"
41703  path="${complete%% *}"
41704  tmp="$complete EOL"
41705  arguments="${tmp#* }"
41706
41707  # Input might be given as Windows format, start by converting to
41708  # unix format.
41709  new_path=`$CYGPATH -u "$path"`
41710
41711  # Now try to locate executable using which
41712  new_path=`$WHICH "$new_path" 2> /dev/null`
41713  # bat and cmd files are not always considered executable in cygwin causing which
41714  # to not find them
41715  if test "x$new_path" = x \
41716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41718    new_path=`$CYGPATH -u "$path"`
41719  fi
41720  if test "x$new_path" = x; then
41721    # Oops. Which didn't find the executable.
41722    # The splitting of arguments from the executable at a space might have been incorrect,
41723    # since paths with space are more likely in Windows. Give it another try with the whole
41724    # argument.
41725    path="$complete"
41726    arguments="EOL"
41727    new_path=`$CYGPATH -u "$path"`
41728    new_path=`$WHICH "$new_path" 2> /dev/null`
41729    # bat and cmd files are not always considered executable in cygwin causing which
41730    # to not find them
41731    if test "x$new_path" = x \
41732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41734      new_path=`$CYGPATH -u "$path"`
41735    fi
41736    if test "x$new_path" = x; then
41737      # It's still not found. Now this is an unrecoverable error.
41738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41739$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41740      has_space=`$ECHO "$complete" | $GREP " "`
41741      if test "x$has_space" != x; then
41742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41744      fi
41745      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41746    fi
41747  fi
41748
41749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41752  # "foo.exe" is OK but "foo" is an error.
41753  #
41754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41755  # It is also a way to make sure we got the proper file name for the real test later on.
41756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41757  if test "x$test_shortpath" = x; then
41758    # Short path failed, file does not exist as specified.
41759    # Try adding .exe or .cmd
41760    if test -f "${new_path}.exe"; then
41761      input_to_shortpath="${new_path}.exe"
41762    elif test -f "${new_path}.cmd"; then
41763      input_to_shortpath="${new_path}.cmd"
41764    else
41765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41766$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41769      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41770    fi
41771  else
41772    input_to_shortpath="$new_path"
41773  fi
41774
41775  # Call helper function which possibly converts this using DOS-style short mode.
41776  # If so, the updated path is stored in $new_path.
41777  new_path="$input_to_shortpath"
41778
41779  input_path="$input_to_shortpath"
41780  # Check if we need to convert this using DOS-style short mode. If the path
41781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41782  # take no chances and rewrite it.
41783  # Note: m4 eats our [], so we need to use [ and ] instead.
41784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41785  if test "x$has_forbidden_chars" != x; then
41786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41790      # Going to short mode and back again did indeed matter. Since short mode is
41791      # case insensitive, let's make it lowercase to improve readability.
41792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41793      # Now convert it back to Unix-style (cygpath)
41794      input_path=`$CYGPATH -u "$shortmode_path"`
41795      new_path="$input_path"
41796    fi
41797  fi
41798
41799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41800  if test "x$test_cygdrive_prefix" = x; then
41801    # As a simple fix, exclude /usr/bin since it's not a real path.
41802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41804      # a path prefixed by /cygdrive for fixpath to work.
41805      new_path="$CYGWIN_ROOT_PATH$input_path"
41806    fi
41807  fi
41808
41809  # remove trailing .exe if any
41810  new_path="${new_path/%.exe/}"
41811
41812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41813
41814  # First separate the path from the arguments. This will split at the first
41815  # space.
41816  complete="$GNM"
41817  path="${complete%% *}"
41818  tmp="$complete EOL"
41819  arguments="${tmp#* }"
41820
41821  # Input might be given as Windows format, start by converting to
41822  # unix format.
41823  new_path="$path"
41824
41825  windows_path="$new_path"
41826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41827    unix_path=`$CYGPATH -u "$windows_path"`
41828    new_path="$unix_path"
41829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41831    new_path="$unix_path"
41832  fi
41833
41834
41835  # Now try to locate executable using which
41836  new_path=`$WHICH "$new_path" 2> /dev/null`
41837
41838  if test "x$new_path" = x; then
41839    # Oops. Which didn't find the executable.
41840    # The splitting of arguments from the executable at a space might have been incorrect,
41841    # since paths with space are more likely in Windows. Give it another try with the whole
41842    # argument.
41843    path="$complete"
41844    arguments="EOL"
41845    new_path="$path"
41846
41847  windows_path="$new_path"
41848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41849    unix_path=`$CYGPATH -u "$windows_path"`
41850    new_path="$unix_path"
41851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41853    new_path="$unix_path"
41854  fi
41855
41856
41857    new_path=`$WHICH "$new_path" 2> /dev/null`
41858    # bat and cmd files are not always considered executable in MSYS causing which
41859    # to not find them
41860    if test "x$new_path" = x \
41861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41863      new_path="$path"
41864
41865  windows_path="$new_path"
41866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41867    unix_path=`$CYGPATH -u "$windows_path"`
41868    new_path="$unix_path"
41869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41871    new_path="$unix_path"
41872  fi
41873
41874    fi
41875
41876    if test "x$new_path" = x; then
41877      # It's still not found. Now this is an unrecoverable error.
41878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41879$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41880      has_space=`$ECHO "$complete" | $GREP " "`
41881      if test "x$has_space" != x; then
41882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41884      fi
41885      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41886    fi
41887  fi
41888
41889  # Now new_path has a complete unix path to the binary
41890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41891    # Keep paths in /bin as-is, but remove trailing .exe if any
41892    new_path="${new_path/%.exe/}"
41893    # Do not save /bin paths to all_fixpath_prefixes!
41894  else
41895    # Not in mixed or Windows style, start by that.
41896    new_path=`cmd //c echo $new_path`
41897
41898  input_path="$new_path"
41899  # Check if we need to convert this using DOS-style short mode. If the path
41900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41901  # take no chances and rewrite it.
41902  # Note: m4 eats our [], so we need to use [ and ] instead.
41903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41904  if test "x$has_forbidden_chars" != x; then
41905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41907  fi
41908
41909    # Output is in $new_path
41910
41911  windows_path="$new_path"
41912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41913    unix_path=`$CYGPATH -u "$windows_path"`
41914    new_path="$unix_path"
41915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41917    new_path="$unix_path"
41918  fi
41919
41920    # remove trailing .exe if any
41921    new_path="${new_path/%.exe/}"
41922
41923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41925  fi
41926
41927    else
41928      # We're on a unix platform. Hooray! :)
41929      # First separate the path from the arguments. This will split at the first
41930      # space.
41931      complete="$GNM"
41932      path="${complete%% *}"
41933      tmp="$complete EOL"
41934      arguments="${tmp#* }"
41935
41936      # Cannot rely on the command "which" here since it doesn't always work.
41937      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41938      if test -z "$is_absolute_path"; then
41939        # Path to executable is not absolute. Find it.
41940        IFS_save="$IFS"
41941        IFS=:
41942        for p in $PATH; do
41943          if test -f "$p/$path" && test -x "$p/$path"; then
41944            new_path="$p/$path"
41945            break
41946          fi
41947        done
41948        IFS="$IFS_save"
41949      else
41950        # This is an absolute path, we can use it without further modifications.
41951        new_path="$path"
41952      fi
41953
41954      if test "x$new_path" = x; then
41955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41956$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41957        has_space=`$ECHO "$complete" | $GREP " "`
41958        if test "x$has_space" != x; then
41959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41961        fi
41962        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41963      fi
41964    fi
41965
41966    # Now join together the path and the arguments once again
41967    if test "x$arguments" != xEOL; then
41968      new_complete="$new_path ${arguments% *}"
41969    else
41970      new_complete="$new_path"
41971    fi
41972
41973    if test "x$complete" != "x$new_complete"; then
41974      GNM="$new_complete"
41975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41976$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41977    fi
41978  fi
41979
41980  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41981    # FIXME: we should unify this with the solaris case above.
41982
41983
41984  # Publish this variable in the help.
41985
41986
41987  if [ -z "${STRIP+x}" ]; then
41988    # The variable is not set by user, try to locate tool using the code snippet
41989    if test -n "$ac_tool_prefix"; then
41990  for ac_prog in strip
41991  do
41992    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41993set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41995$as_echo_n "checking for $ac_word... " >&6; }
41996if ${ac_cv_prog_STRIP+:} false; then :
41997  $as_echo_n "(cached) " >&6
41998else
41999  if test -n "$STRIP"; then
42000  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42001else
42002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42003for as_dir in $PATH
42004do
42005  IFS=$as_save_IFS
42006  test -z "$as_dir" && as_dir=.
42007    for ac_exec_ext in '' $ac_executable_extensions; do
42008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42009    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42011    break 2
42012  fi
42013done
42014  done
42015IFS=$as_save_IFS
42016
42017fi
42018fi
42019STRIP=$ac_cv_prog_STRIP
42020if test -n "$STRIP"; then
42021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42022$as_echo "$STRIP" >&6; }
42023else
42024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42025$as_echo "no" >&6; }
42026fi
42027
42028
42029    test -n "$STRIP" && break
42030  done
42031fi
42032if test -z "$STRIP"; then
42033  ac_ct_STRIP=$STRIP
42034  for ac_prog in strip
42035do
42036  # Extract the first word of "$ac_prog", so it can be a program name with args.
42037set dummy $ac_prog; ac_word=$2
42038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42039$as_echo_n "checking for $ac_word... " >&6; }
42040if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42041  $as_echo_n "(cached) " >&6
42042else
42043  if test -n "$ac_ct_STRIP"; then
42044  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42045else
42046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42047for as_dir in $PATH
42048do
42049  IFS=$as_save_IFS
42050  test -z "$as_dir" && as_dir=.
42051    for ac_exec_ext in '' $ac_executable_extensions; do
42052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42053    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42055    break 2
42056  fi
42057done
42058  done
42059IFS=$as_save_IFS
42060
42061fi
42062fi
42063ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42064if test -n "$ac_ct_STRIP"; then
42065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42066$as_echo "$ac_ct_STRIP" >&6; }
42067else
42068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42069$as_echo "no" >&6; }
42070fi
42071
42072
42073  test -n "$ac_ct_STRIP" && break
42074done
42075
42076  if test "x$ac_ct_STRIP" = x; then
42077    STRIP=""
42078  else
42079    case $cross_compiling:$ac_tool_warned in
42080yes:)
42081{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42082$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42083ac_tool_warned=yes ;;
42084esac
42085    STRIP=$ac_ct_STRIP
42086  fi
42087fi
42088
42089  else
42090    # The variable is set, but is it from the command line or the environment?
42091
42092    # Try to remove the string !STRIP! from our list.
42093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42095      # If it failed, the variable was not from the command line. Ignore it,
42096      # but warn the user (except for BASH, which is always set by the calling BASH).
42097      if test "xSTRIP" != xBASH; then
42098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42099$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42100      fi
42101      # Try to locate tool using the code snippet
42102      if test -n "$ac_tool_prefix"; then
42103  for ac_prog in strip
42104  do
42105    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42106set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42108$as_echo_n "checking for $ac_word... " >&6; }
42109if ${ac_cv_prog_STRIP+:} false; then :
42110  $as_echo_n "(cached) " >&6
42111else
42112  if test -n "$STRIP"; then
42113  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42114else
42115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42116for as_dir in $PATH
42117do
42118  IFS=$as_save_IFS
42119  test -z "$as_dir" && as_dir=.
42120    for ac_exec_ext in '' $ac_executable_extensions; do
42121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42122    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42124    break 2
42125  fi
42126done
42127  done
42128IFS=$as_save_IFS
42129
42130fi
42131fi
42132STRIP=$ac_cv_prog_STRIP
42133if test -n "$STRIP"; then
42134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42135$as_echo "$STRIP" >&6; }
42136else
42137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42138$as_echo "no" >&6; }
42139fi
42140
42141
42142    test -n "$STRIP" && break
42143  done
42144fi
42145if test -z "$STRIP"; then
42146  ac_ct_STRIP=$STRIP
42147  for ac_prog in strip
42148do
42149  # Extract the first word of "$ac_prog", so it can be a program name with args.
42150set dummy $ac_prog; ac_word=$2
42151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42152$as_echo_n "checking for $ac_word... " >&6; }
42153if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42154  $as_echo_n "(cached) " >&6
42155else
42156  if test -n "$ac_ct_STRIP"; then
42157  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42158else
42159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42160for as_dir in $PATH
42161do
42162  IFS=$as_save_IFS
42163  test -z "$as_dir" && as_dir=.
42164    for ac_exec_ext in '' $ac_executable_extensions; do
42165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42166    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42168    break 2
42169  fi
42170done
42171  done
42172IFS=$as_save_IFS
42173
42174fi
42175fi
42176ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42177if test -n "$ac_ct_STRIP"; then
42178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42179$as_echo "$ac_ct_STRIP" >&6; }
42180else
42181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42182$as_echo "no" >&6; }
42183fi
42184
42185
42186  test -n "$ac_ct_STRIP" && break
42187done
42188
42189  if test "x$ac_ct_STRIP" = x; then
42190    STRIP=""
42191  else
42192    case $cross_compiling:$ac_tool_warned in
42193yes:)
42194{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42195$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42196ac_tool_warned=yes ;;
42197esac
42198    STRIP=$ac_ct_STRIP
42199  fi
42200fi
42201
42202    else
42203      # If it succeeded, then it was overridden by the user. We will use it
42204      # for the tool.
42205
42206      # First remove it from the list of overridden variables, so we can test
42207      # for unknown variables in the end.
42208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42209
42210      # Check if we try to supply an empty value
42211      if test "x$STRIP" = x; then
42212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42213$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42215$as_echo_n "checking for STRIP... " >&6; }
42216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42217$as_echo "disabled" >&6; }
42218      else
42219        # Check if the provided tool contains a complete path.
42220        tool_specified="$STRIP"
42221        tool_basename="${tool_specified##*/}"
42222        if test "x$tool_basename" = "x$tool_specified"; then
42223          # A command without a complete path is provided, search $PATH.
42224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42225$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42226          # Extract the first word of "$tool_basename", so it can be a program name with args.
42227set dummy $tool_basename; ac_word=$2
42228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42229$as_echo_n "checking for $ac_word... " >&6; }
42230if ${ac_cv_path_STRIP+:} false; then :
42231  $as_echo_n "(cached) " >&6
42232else
42233  case $STRIP in
42234  [\\/]* | ?:[\\/]*)
42235  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42236  ;;
42237  *)
42238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42239for as_dir in $PATH
42240do
42241  IFS=$as_save_IFS
42242  test -z "$as_dir" && as_dir=.
42243    for ac_exec_ext in '' $ac_executable_extensions; do
42244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42245    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42247    break 2
42248  fi
42249done
42250  done
42251IFS=$as_save_IFS
42252
42253  ;;
42254esac
42255fi
42256STRIP=$ac_cv_path_STRIP
42257if test -n "$STRIP"; then
42258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42259$as_echo "$STRIP" >&6; }
42260else
42261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42262$as_echo "no" >&6; }
42263fi
42264
42265
42266          if test "x$STRIP" = x; then
42267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42268          fi
42269        else
42270          # Otherwise we believe it is a complete path. Use it as it is.
42271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42272$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42274$as_echo_n "checking for STRIP... " >&6; }
42275          if test ! -x "$tool_specified"; then
42276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42277$as_echo "not found" >&6; }
42278            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42279          fi
42280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42281$as_echo "$tool_specified" >&6; }
42282        fi
42283      fi
42284    fi
42285
42286  fi
42287
42288
42289
42290  # Only process if variable expands to non-empty
42291
42292  if test "x$STRIP" != x; then
42293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42294
42295  # First separate the path from the arguments. This will split at the first
42296  # space.
42297  complete="$STRIP"
42298  path="${complete%% *}"
42299  tmp="$complete EOL"
42300  arguments="${tmp#* }"
42301
42302  # Input might be given as Windows format, start by converting to
42303  # unix format.
42304  new_path=`$CYGPATH -u "$path"`
42305
42306  # Now try to locate executable using which
42307  new_path=`$WHICH "$new_path" 2> /dev/null`
42308  # bat and cmd files are not always considered executable in cygwin causing which
42309  # to not find them
42310  if test "x$new_path" = x \
42311      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42312      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42313    new_path=`$CYGPATH -u "$path"`
42314  fi
42315  if test "x$new_path" = x; then
42316    # Oops. Which didn't find the executable.
42317    # The splitting of arguments from the executable at a space might have been incorrect,
42318    # since paths with space are more likely in Windows. Give it another try with the whole
42319    # argument.
42320    path="$complete"
42321    arguments="EOL"
42322    new_path=`$CYGPATH -u "$path"`
42323    new_path=`$WHICH "$new_path" 2> /dev/null`
42324    # bat and cmd files are not always considered executable in cygwin causing which
42325    # to not find them
42326    if test "x$new_path" = x \
42327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42329      new_path=`$CYGPATH -u "$path"`
42330    fi
42331    if test "x$new_path" = x; then
42332      # It's still not found. Now this is an unrecoverable error.
42333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42334$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42335      has_space=`$ECHO "$complete" | $GREP " "`
42336      if test "x$has_space" != x; then
42337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42339      fi
42340      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42341    fi
42342  fi
42343
42344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42347  # "foo.exe" is OK but "foo" is an error.
42348  #
42349  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42350  # It is also a way to make sure we got the proper file name for the real test later on.
42351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42352  if test "x$test_shortpath" = x; then
42353    # Short path failed, file does not exist as specified.
42354    # Try adding .exe or .cmd
42355    if test -f "${new_path}.exe"; then
42356      input_to_shortpath="${new_path}.exe"
42357    elif test -f "${new_path}.cmd"; then
42358      input_to_shortpath="${new_path}.cmd"
42359    else
42360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42361$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42364      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42365    fi
42366  else
42367    input_to_shortpath="$new_path"
42368  fi
42369
42370  # Call helper function which possibly converts this using DOS-style short mode.
42371  # If so, the updated path is stored in $new_path.
42372  new_path="$input_to_shortpath"
42373
42374  input_path="$input_to_shortpath"
42375  # Check if we need to convert this using DOS-style short mode. If the path
42376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42377  # take no chances and rewrite it.
42378  # Note: m4 eats our [], so we need to use [ and ] instead.
42379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42380  if test "x$has_forbidden_chars" != x; then
42381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42385      # Going to short mode and back again did indeed matter. Since short mode is
42386      # case insensitive, let's make it lowercase to improve readability.
42387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42388      # Now convert it back to Unix-style (cygpath)
42389      input_path=`$CYGPATH -u "$shortmode_path"`
42390      new_path="$input_path"
42391    fi
42392  fi
42393
42394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42395  if test "x$test_cygdrive_prefix" = x; then
42396    # As a simple fix, exclude /usr/bin since it's not a real path.
42397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42399      # a path prefixed by /cygdrive for fixpath to work.
42400      new_path="$CYGWIN_ROOT_PATH$input_path"
42401    fi
42402  fi
42403
42404  # remove trailing .exe if any
42405  new_path="${new_path/%.exe/}"
42406
42407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42408
42409  # First separate the path from the arguments. This will split at the first
42410  # space.
42411  complete="$STRIP"
42412  path="${complete%% *}"
42413  tmp="$complete EOL"
42414  arguments="${tmp#* }"
42415
42416  # Input might be given as Windows format, start by converting to
42417  # unix format.
42418  new_path="$path"
42419
42420  windows_path="$new_path"
42421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42422    unix_path=`$CYGPATH -u "$windows_path"`
42423    new_path="$unix_path"
42424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42426    new_path="$unix_path"
42427  fi
42428
42429
42430  # Now try to locate executable using which
42431  new_path=`$WHICH "$new_path" 2> /dev/null`
42432
42433  if test "x$new_path" = x; then
42434    # Oops. Which didn't find the executable.
42435    # The splitting of arguments from the executable at a space might have been incorrect,
42436    # since paths with space are more likely in Windows. Give it another try with the whole
42437    # argument.
42438    path="$complete"
42439    arguments="EOL"
42440    new_path="$path"
42441
42442  windows_path="$new_path"
42443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42444    unix_path=`$CYGPATH -u "$windows_path"`
42445    new_path="$unix_path"
42446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42448    new_path="$unix_path"
42449  fi
42450
42451
42452    new_path=`$WHICH "$new_path" 2> /dev/null`
42453    # bat and cmd files are not always considered executable in MSYS causing which
42454    # to not find them
42455    if test "x$new_path" = x \
42456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42458      new_path="$path"
42459
42460  windows_path="$new_path"
42461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42462    unix_path=`$CYGPATH -u "$windows_path"`
42463    new_path="$unix_path"
42464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42466    new_path="$unix_path"
42467  fi
42468
42469    fi
42470
42471    if test "x$new_path" = x; then
42472      # It's still not found. Now this is an unrecoverable error.
42473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42474$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42475      has_space=`$ECHO "$complete" | $GREP " "`
42476      if test "x$has_space" != x; then
42477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42479      fi
42480      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42481    fi
42482  fi
42483
42484  # Now new_path has a complete unix path to the binary
42485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42486    # Keep paths in /bin as-is, but remove trailing .exe if any
42487    new_path="${new_path/%.exe/}"
42488    # Do not save /bin paths to all_fixpath_prefixes!
42489  else
42490    # Not in mixed or Windows style, start by that.
42491    new_path=`cmd //c echo $new_path`
42492
42493  input_path="$new_path"
42494  # Check if we need to convert this using DOS-style short mode. If the path
42495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42496  # take no chances and rewrite it.
42497  # Note: m4 eats our [], so we need to use [ and ] instead.
42498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42499  if test "x$has_forbidden_chars" != x; then
42500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42502  fi
42503
42504    # Output is in $new_path
42505
42506  windows_path="$new_path"
42507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42508    unix_path=`$CYGPATH -u "$windows_path"`
42509    new_path="$unix_path"
42510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42512    new_path="$unix_path"
42513  fi
42514
42515    # remove trailing .exe if any
42516    new_path="${new_path/%.exe/}"
42517
42518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42520  fi
42521
42522    else
42523      # We're on a unix platform. Hooray! :)
42524      # First separate the path from the arguments. This will split at the first
42525      # space.
42526      complete="$STRIP"
42527      path="${complete%% *}"
42528      tmp="$complete EOL"
42529      arguments="${tmp#* }"
42530
42531      # Cannot rely on the command "which" here since it doesn't always work.
42532      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42533      if test -z "$is_absolute_path"; then
42534        # Path to executable is not absolute. Find it.
42535        IFS_save="$IFS"
42536        IFS=:
42537        for p in $PATH; do
42538          if test -f "$p/$path" && test -x "$p/$path"; then
42539            new_path="$p/$path"
42540            break
42541          fi
42542        done
42543        IFS="$IFS_save"
42544      else
42545        # This is an absolute path, we can use it without further modifications.
42546        new_path="$path"
42547      fi
42548
42549      if test "x$new_path" = x; then
42550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42551$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42552        has_space=`$ECHO "$complete" | $GREP " "`
42553        if test "x$has_space" != x; then
42554          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42556        fi
42557        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42558      fi
42559    fi
42560
42561    # Now join together the path and the arguments once again
42562    if test "x$arguments" != xEOL; then
42563      new_complete="$new_path ${arguments% *}"
42564    else
42565      new_complete="$new_path"
42566    fi
42567
42568    if test "x$complete" != "x$new_complete"; then
42569      STRIP="$new_complete"
42570      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42571$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42572    fi
42573  fi
42574
42575    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42576
42577
42578  # Publish this variable in the help.
42579
42580
42581  if [ -z "${NM+x}" ]; then
42582    # The variable is not set by user, try to locate tool using the code snippet
42583    if test -n "$ac_tool_prefix"; then
42584  for ac_prog in nm gcc-nm
42585  do
42586    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42587set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42589$as_echo_n "checking for $ac_word... " >&6; }
42590if ${ac_cv_prog_NM+:} false; then :
42591  $as_echo_n "(cached) " >&6
42592else
42593  if test -n "$NM"; then
42594  ac_cv_prog_NM="$NM" # Let the user override the test.
42595else
42596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42597for as_dir in $PATH
42598do
42599  IFS=$as_save_IFS
42600  test -z "$as_dir" && as_dir=.
42601    for ac_exec_ext in '' $ac_executable_extensions; do
42602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42603    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42605    break 2
42606  fi
42607done
42608  done
42609IFS=$as_save_IFS
42610
42611fi
42612fi
42613NM=$ac_cv_prog_NM
42614if test -n "$NM"; then
42615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42616$as_echo "$NM" >&6; }
42617else
42618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42619$as_echo "no" >&6; }
42620fi
42621
42622
42623    test -n "$NM" && break
42624  done
42625fi
42626if test -z "$NM"; then
42627  ac_ct_NM=$NM
42628  for ac_prog in nm gcc-nm
42629do
42630  # Extract the first word of "$ac_prog", so it can be a program name with args.
42631set dummy $ac_prog; ac_word=$2
42632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42633$as_echo_n "checking for $ac_word... " >&6; }
42634if ${ac_cv_prog_ac_ct_NM+:} false; then :
42635  $as_echo_n "(cached) " >&6
42636else
42637  if test -n "$ac_ct_NM"; then
42638  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42639else
42640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42641for as_dir in $PATH
42642do
42643  IFS=$as_save_IFS
42644  test -z "$as_dir" && as_dir=.
42645    for ac_exec_ext in '' $ac_executable_extensions; do
42646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42647    ac_cv_prog_ac_ct_NM="$ac_prog"
42648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42649    break 2
42650  fi
42651done
42652  done
42653IFS=$as_save_IFS
42654
42655fi
42656fi
42657ac_ct_NM=$ac_cv_prog_ac_ct_NM
42658if test -n "$ac_ct_NM"; then
42659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42660$as_echo "$ac_ct_NM" >&6; }
42661else
42662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42663$as_echo "no" >&6; }
42664fi
42665
42666
42667  test -n "$ac_ct_NM" && break
42668done
42669
42670  if test "x$ac_ct_NM" = x; then
42671    NM=""
42672  else
42673    case $cross_compiling:$ac_tool_warned in
42674yes:)
42675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42677ac_tool_warned=yes ;;
42678esac
42679    NM=$ac_ct_NM
42680  fi
42681fi
42682
42683  else
42684    # The variable is set, but is it from the command line or the environment?
42685
42686    # Try to remove the string !NM! from our list.
42687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42689      # If it failed, the variable was not from the command line. Ignore it,
42690      # but warn the user (except for BASH, which is always set by the calling BASH).
42691      if test "xNM" != xBASH; then
42692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42693$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42694      fi
42695      # Try to locate tool using the code snippet
42696      if test -n "$ac_tool_prefix"; then
42697  for ac_prog in nm gcc-nm
42698  do
42699    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42700set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42702$as_echo_n "checking for $ac_word... " >&6; }
42703if ${ac_cv_prog_NM+:} false; then :
42704  $as_echo_n "(cached) " >&6
42705else
42706  if test -n "$NM"; then
42707  ac_cv_prog_NM="$NM" # Let the user override the test.
42708else
42709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42710for as_dir in $PATH
42711do
42712  IFS=$as_save_IFS
42713  test -z "$as_dir" && as_dir=.
42714    for ac_exec_ext in '' $ac_executable_extensions; do
42715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42716    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42718    break 2
42719  fi
42720done
42721  done
42722IFS=$as_save_IFS
42723
42724fi
42725fi
42726NM=$ac_cv_prog_NM
42727if test -n "$NM"; then
42728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42729$as_echo "$NM" >&6; }
42730else
42731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42732$as_echo "no" >&6; }
42733fi
42734
42735
42736    test -n "$NM" && break
42737  done
42738fi
42739if test -z "$NM"; then
42740  ac_ct_NM=$NM
42741  for ac_prog in nm gcc-nm
42742do
42743  # Extract the first word of "$ac_prog", so it can be a program name with args.
42744set dummy $ac_prog; ac_word=$2
42745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42746$as_echo_n "checking for $ac_word... " >&6; }
42747if ${ac_cv_prog_ac_ct_NM+:} false; then :
42748  $as_echo_n "(cached) " >&6
42749else
42750  if test -n "$ac_ct_NM"; then
42751  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42752else
42753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42754for as_dir in $PATH
42755do
42756  IFS=$as_save_IFS
42757  test -z "$as_dir" && as_dir=.
42758    for ac_exec_ext in '' $ac_executable_extensions; do
42759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42760    ac_cv_prog_ac_ct_NM="$ac_prog"
42761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42762    break 2
42763  fi
42764done
42765  done
42766IFS=$as_save_IFS
42767
42768fi
42769fi
42770ac_ct_NM=$ac_cv_prog_ac_ct_NM
42771if test -n "$ac_ct_NM"; then
42772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42773$as_echo "$ac_ct_NM" >&6; }
42774else
42775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42776$as_echo "no" >&6; }
42777fi
42778
42779
42780  test -n "$ac_ct_NM" && break
42781done
42782
42783  if test "x$ac_ct_NM" = x; then
42784    NM=""
42785  else
42786    case $cross_compiling:$ac_tool_warned in
42787yes:)
42788{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42789$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42790ac_tool_warned=yes ;;
42791esac
42792    NM=$ac_ct_NM
42793  fi
42794fi
42795
42796    else
42797      # If it succeeded, then it was overridden by the user. We will use it
42798      # for the tool.
42799
42800      # First remove it from the list of overridden variables, so we can test
42801      # for unknown variables in the end.
42802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42803
42804      # Check if we try to supply an empty value
42805      if test "x$NM" = x; then
42806        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42807$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42809$as_echo_n "checking for NM... " >&6; }
42810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42811$as_echo "disabled" >&6; }
42812      else
42813        # Check if the provided tool contains a complete path.
42814        tool_specified="$NM"
42815        tool_basename="${tool_specified##*/}"
42816        if test "x$tool_basename" = "x$tool_specified"; then
42817          # A command without a complete path is provided, search $PATH.
42818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42819$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42820          # Extract the first word of "$tool_basename", so it can be a program name with args.
42821set dummy $tool_basename; ac_word=$2
42822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42823$as_echo_n "checking for $ac_word... " >&6; }
42824if ${ac_cv_path_NM+:} false; then :
42825  $as_echo_n "(cached) " >&6
42826else
42827  case $NM in
42828  [\\/]* | ?:[\\/]*)
42829  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42830  ;;
42831  *)
42832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42833for as_dir in $PATH
42834do
42835  IFS=$as_save_IFS
42836  test -z "$as_dir" && as_dir=.
42837    for ac_exec_ext in '' $ac_executable_extensions; do
42838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42839    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42841    break 2
42842  fi
42843done
42844  done
42845IFS=$as_save_IFS
42846
42847  ;;
42848esac
42849fi
42850NM=$ac_cv_path_NM
42851if test -n "$NM"; then
42852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42853$as_echo "$NM" >&6; }
42854else
42855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42856$as_echo "no" >&6; }
42857fi
42858
42859
42860          if test "x$NM" = x; then
42861            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42862          fi
42863        else
42864          # Otherwise we believe it is a complete path. Use it as it is.
42865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42866$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42867          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42868$as_echo_n "checking for NM... " >&6; }
42869          if test ! -x "$tool_specified"; then
42870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42871$as_echo "not found" >&6; }
42872            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42873          fi
42874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42875$as_echo "$tool_specified" >&6; }
42876        fi
42877      fi
42878    fi
42879
42880  fi
42881
42882
42883    else
42884
42885
42886  # Publish this variable in the help.
42887
42888
42889  if [ -z "${NM+x}" ]; then
42890    # The variable is not set by user, try to locate tool using the code snippet
42891    if test -n "$ac_tool_prefix"; then
42892  for ac_prog in nm
42893  do
42894    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42895set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42897$as_echo_n "checking for $ac_word... " >&6; }
42898if ${ac_cv_prog_NM+:} false; then :
42899  $as_echo_n "(cached) " >&6
42900else
42901  if test -n "$NM"; then
42902  ac_cv_prog_NM="$NM" # Let the user override the test.
42903else
42904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42905for as_dir in $PATH
42906do
42907  IFS=$as_save_IFS
42908  test -z "$as_dir" && as_dir=.
42909    for ac_exec_ext in '' $ac_executable_extensions; do
42910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42911    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42913    break 2
42914  fi
42915done
42916  done
42917IFS=$as_save_IFS
42918
42919fi
42920fi
42921NM=$ac_cv_prog_NM
42922if test -n "$NM"; then
42923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42924$as_echo "$NM" >&6; }
42925else
42926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42927$as_echo "no" >&6; }
42928fi
42929
42930
42931    test -n "$NM" && break
42932  done
42933fi
42934if test -z "$NM"; then
42935  ac_ct_NM=$NM
42936  for ac_prog in nm
42937do
42938  # Extract the first word of "$ac_prog", so it can be a program name with args.
42939set dummy $ac_prog; ac_word=$2
42940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42941$as_echo_n "checking for $ac_word... " >&6; }
42942if ${ac_cv_prog_ac_ct_NM+:} false; then :
42943  $as_echo_n "(cached) " >&6
42944else
42945  if test -n "$ac_ct_NM"; then
42946  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42947else
42948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42949for as_dir in $PATH
42950do
42951  IFS=$as_save_IFS
42952  test -z "$as_dir" && as_dir=.
42953    for ac_exec_ext in '' $ac_executable_extensions; do
42954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42955    ac_cv_prog_ac_ct_NM="$ac_prog"
42956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42957    break 2
42958  fi
42959done
42960  done
42961IFS=$as_save_IFS
42962
42963fi
42964fi
42965ac_ct_NM=$ac_cv_prog_ac_ct_NM
42966if test -n "$ac_ct_NM"; then
42967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42968$as_echo "$ac_ct_NM" >&6; }
42969else
42970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42971$as_echo "no" >&6; }
42972fi
42973
42974
42975  test -n "$ac_ct_NM" && break
42976done
42977
42978  if test "x$ac_ct_NM" = x; then
42979    NM=""
42980  else
42981    case $cross_compiling:$ac_tool_warned in
42982yes:)
42983{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42984$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42985ac_tool_warned=yes ;;
42986esac
42987    NM=$ac_ct_NM
42988  fi
42989fi
42990
42991  else
42992    # The variable is set, but is it from the command line or the environment?
42993
42994    # Try to remove the string !NM! from our list.
42995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42997      # If it failed, the variable was not from the command line. Ignore it,
42998      # but warn the user (except for BASH, which is always set by the calling BASH).
42999      if test "xNM" != xBASH; then
43000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43001$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43002      fi
43003      # Try to locate tool using the code snippet
43004      if test -n "$ac_tool_prefix"; then
43005  for ac_prog in nm
43006  do
43007    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43008set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43010$as_echo_n "checking for $ac_word... " >&6; }
43011if ${ac_cv_prog_NM+:} false; then :
43012  $as_echo_n "(cached) " >&6
43013else
43014  if test -n "$NM"; then
43015  ac_cv_prog_NM="$NM" # Let the user override the test.
43016else
43017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43018for as_dir in $PATH
43019do
43020  IFS=$as_save_IFS
43021  test -z "$as_dir" && as_dir=.
43022    for ac_exec_ext in '' $ac_executable_extensions; do
43023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43024    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43026    break 2
43027  fi
43028done
43029  done
43030IFS=$as_save_IFS
43031
43032fi
43033fi
43034NM=$ac_cv_prog_NM
43035if test -n "$NM"; then
43036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43037$as_echo "$NM" >&6; }
43038else
43039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43040$as_echo "no" >&6; }
43041fi
43042
43043
43044    test -n "$NM" && break
43045  done
43046fi
43047if test -z "$NM"; then
43048  ac_ct_NM=$NM
43049  for ac_prog in nm
43050do
43051  # Extract the first word of "$ac_prog", so it can be a program name with args.
43052set dummy $ac_prog; ac_word=$2
43053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43054$as_echo_n "checking for $ac_word... " >&6; }
43055if ${ac_cv_prog_ac_ct_NM+:} false; then :
43056  $as_echo_n "(cached) " >&6
43057else
43058  if test -n "$ac_ct_NM"; then
43059  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43060else
43061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43062for as_dir in $PATH
43063do
43064  IFS=$as_save_IFS
43065  test -z "$as_dir" && as_dir=.
43066    for ac_exec_ext in '' $ac_executable_extensions; do
43067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43068    ac_cv_prog_ac_ct_NM="$ac_prog"
43069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43070    break 2
43071  fi
43072done
43073  done
43074IFS=$as_save_IFS
43075
43076fi
43077fi
43078ac_ct_NM=$ac_cv_prog_ac_ct_NM
43079if test -n "$ac_ct_NM"; then
43080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43081$as_echo "$ac_ct_NM" >&6; }
43082else
43083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43084$as_echo "no" >&6; }
43085fi
43086
43087
43088  test -n "$ac_ct_NM" && break
43089done
43090
43091  if test "x$ac_ct_NM" = x; then
43092    NM=""
43093  else
43094    case $cross_compiling:$ac_tool_warned in
43095yes:)
43096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43098ac_tool_warned=yes ;;
43099esac
43100    NM=$ac_ct_NM
43101  fi
43102fi
43103
43104    else
43105      # If it succeeded, then it was overridden by the user. We will use it
43106      # for the tool.
43107
43108      # First remove it from the list of overridden variables, so we can test
43109      # for unknown variables in the end.
43110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43111
43112      # Check if we try to supply an empty value
43113      if test "x$NM" = x; then
43114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43115$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43117$as_echo_n "checking for NM... " >&6; }
43118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43119$as_echo "disabled" >&6; }
43120      else
43121        # Check if the provided tool contains a complete path.
43122        tool_specified="$NM"
43123        tool_basename="${tool_specified##*/}"
43124        if test "x$tool_basename" = "x$tool_specified"; then
43125          # A command without a complete path is provided, search $PATH.
43126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43127$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43128          # Extract the first word of "$tool_basename", so it can be a program name with args.
43129set dummy $tool_basename; ac_word=$2
43130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43131$as_echo_n "checking for $ac_word... " >&6; }
43132if ${ac_cv_path_NM+:} false; then :
43133  $as_echo_n "(cached) " >&6
43134else
43135  case $NM in
43136  [\\/]* | ?:[\\/]*)
43137  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43138  ;;
43139  *)
43140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43141for as_dir in $PATH
43142do
43143  IFS=$as_save_IFS
43144  test -z "$as_dir" && as_dir=.
43145    for ac_exec_ext in '' $ac_executable_extensions; do
43146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43147    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43149    break 2
43150  fi
43151done
43152  done
43153IFS=$as_save_IFS
43154
43155  ;;
43156esac
43157fi
43158NM=$ac_cv_path_NM
43159if test -n "$NM"; then
43160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43161$as_echo "$NM" >&6; }
43162else
43163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43164$as_echo "no" >&6; }
43165fi
43166
43167
43168          if test "x$NM" = x; then
43169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43170          fi
43171        else
43172          # Otherwise we believe it is a complete path. Use it as it is.
43173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43174$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43176$as_echo_n "checking for NM... " >&6; }
43177          if test ! -x "$tool_specified"; then
43178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43179$as_echo "not found" >&6; }
43180            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43181          fi
43182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43183$as_echo "$tool_specified" >&6; }
43184        fi
43185      fi
43186    fi
43187
43188  fi
43189
43190
43191    fi
43192
43193  # Only process if variable expands to non-empty
43194
43195  if test "x$NM" != x; then
43196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43197
43198  # First separate the path from the arguments. This will split at the first
43199  # space.
43200  complete="$NM"
43201  path="${complete%% *}"
43202  tmp="$complete EOL"
43203  arguments="${tmp#* }"
43204
43205  # Input might be given as Windows format, start by converting to
43206  # unix format.
43207  new_path=`$CYGPATH -u "$path"`
43208
43209  # Now try to locate executable using which
43210  new_path=`$WHICH "$new_path" 2> /dev/null`
43211  # bat and cmd files are not always considered executable in cygwin causing which
43212  # to not find them
43213  if test "x$new_path" = x \
43214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43216    new_path=`$CYGPATH -u "$path"`
43217  fi
43218  if test "x$new_path" = x; then
43219    # Oops. Which didn't find the executable.
43220    # The splitting of arguments from the executable at a space might have been incorrect,
43221    # since paths with space are more likely in Windows. Give it another try with the whole
43222    # argument.
43223    path="$complete"
43224    arguments="EOL"
43225    new_path=`$CYGPATH -u "$path"`
43226    new_path=`$WHICH "$new_path" 2> /dev/null`
43227    # bat and cmd files are not always considered executable in cygwin causing which
43228    # to not find them
43229    if test "x$new_path" = x \
43230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43232      new_path=`$CYGPATH -u "$path"`
43233    fi
43234    if test "x$new_path" = x; then
43235      # It's still not found. Now this is an unrecoverable error.
43236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43237$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43238      has_space=`$ECHO "$complete" | $GREP " "`
43239      if test "x$has_space" != x; then
43240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43242      fi
43243      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43244    fi
43245  fi
43246
43247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43250  # "foo.exe" is OK but "foo" is an error.
43251  #
43252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43253  # It is also a way to make sure we got the proper file name for the real test later on.
43254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43255  if test "x$test_shortpath" = x; then
43256    # Short path failed, file does not exist as specified.
43257    # Try adding .exe or .cmd
43258    if test -f "${new_path}.exe"; then
43259      input_to_shortpath="${new_path}.exe"
43260    elif test -f "${new_path}.cmd"; then
43261      input_to_shortpath="${new_path}.cmd"
43262    else
43263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43264$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43267      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43268    fi
43269  else
43270    input_to_shortpath="$new_path"
43271  fi
43272
43273  # Call helper function which possibly converts this using DOS-style short mode.
43274  # If so, the updated path is stored in $new_path.
43275  new_path="$input_to_shortpath"
43276
43277  input_path="$input_to_shortpath"
43278  # Check if we need to convert this using DOS-style short mode. If the path
43279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43280  # take no chances and rewrite it.
43281  # Note: m4 eats our [], so we need to use [ and ] instead.
43282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43283  if test "x$has_forbidden_chars" != x; then
43284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43288      # Going to short mode and back again did indeed matter. Since short mode is
43289      # case insensitive, let's make it lowercase to improve readability.
43290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43291      # Now convert it back to Unix-style (cygpath)
43292      input_path=`$CYGPATH -u "$shortmode_path"`
43293      new_path="$input_path"
43294    fi
43295  fi
43296
43297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43298  if test "x$test_cygdrive_prefix" = x; then
43299    # As a simple fix, exclude /usr/bin since it's not a real path.
43300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43302      # a path prefixed by /cygdrive for fixpath to work.
43303      new_path="$CYGWIN_ROOT_PATH$input_path"
43304    fi
43305  fi
43306
43307  # remove trailing .exe if any
43308  new_path="${new_path/%.exe/}"
43309
43310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43311
43312  # First separate the path from the arguments. This will split at the first
43313  # space.
43314  complete="$NM"
43315  path="${complete%% *}"
43316  tmp="$complete EOL"
43317  arguments="${tmp#* }"
43318
43319  # Input might be given as Windows format, start by converting to
43320  # unix format.
43321  new_path="$path"
43322
43323  windows_path="$new_path"
43324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43325    unix_path=`$CYGPATH -u "$windows_path"`
43326    new_path="$unix_path"
43327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43329    new_path="$unix_path"
43330  fi
43331
43332
43333  # Now try to locate executable using which
43334  new_path=`$WHICH "$new_path" 2> /dev/null`
43335
43336  if test "x$new_path" = x; then
43337    # Oops. Which didn't find the executable.
43338    # The splitting of arguments from the executable at a space might have been incorrect,
43339    # since paths with space are more likely in Windows. Give it another try with the whole
43340    # argument.
43341    path="$complete"
43342    arguments="EOL"
43343    new_path="$path"
43344
43345  windows_path="$new_path"
43346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43347    unix_path=`$CYGPATH -u "$windows_path"`
43348    new_path="$unix_path"
43349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43351    new_path="$unix_path"
43352  fi
43353
43354
43355    new_path=`$WHICH "$new_path" 2> /dev/null`
43356    # bat and cmd files are not always considered executable in MSYS causing which
43357    # to not find them
43358    if test "x$new_path" = x \
43359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43361      new_path="$path"
43362
43363  windows_path="$new_path"
43364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43365    unix_path=`$CYGPATH -u "$windows_path"`
43366    new_path="$unix_path"
43367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43369    new_path="$unix_path"
43370  fi
43371
43372    fi
43373
43374    if test "x$new_path" = x; then
43375      # It's still not found. Now this is an unrecoverable error.
43376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43377$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43378      has_space=`$ECHO "$complete" | $GREP " "`
43379      if test "x$has_space" != x; then
43380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43382      fi
43383      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43384    fi
43385  fi
43386
43387  # Now new_path has a complete unix path to the binary
43388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43389    # Keep paths in /bin as-is, but remove trailing .exe if any
43390    new_path="${new_path/%.exe/}"
43391    # Do not save /bin paths to all_fixpath_prefixes!
43392  else
43393    # Not in mixed or Windows style, start by that.
43394    new_path=`cmd //c echo $new_path`
43395
43396  input_path="$new_path"
43397  # Check if we need to convert this using DOS-style short mode. If the path
43398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43399  # take no chances and rewrite it.
43400  # Note: m4 eats our [], so we need to use [ and ] instead.
43401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43402  if test "x$has_forbidden_chars" != x; then
43403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43405  fi
43406
43407    # Output is in $new_path
43408
43409  windows_path="$new_path"
43410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43411    unix_path=`$CYGPATH -u "$windows_path"`
43412    new_path="$unix_path"
43413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43415    new_path="$unix_path"
43416  fi
43417
43418    # remove trailing .exe if any
43419    new_path="${new_path/%.exe/}"
43420
43421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43423  fi
43424
43425    else
43426      # We're on a unix platform. Hooray! :)
43427      # First separate the path from the arguments. This will split at the first
43428      # space.
43429      complete="$NM"
43430      path="${complete%% *}"
43431      tmp="$complete EOL"
43432      arguments="${tmp#* }"
43433
43434      # Cannot rely on the command "which" here since it doesn't always work.
43435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43436      if test -z "$is_absolute_path"; then
43437        # Path to executable is not absolute. Find it.
43438        IFS_save="$IFS"
43439        IFS=:
43440        for p in $PATH; do
43441          if test -f "$p/$path" && test -x "$p/$path"; then
43442            new_path="$p/$path"
43443            break
43444          fi
43445        done
43446        IFS="$IFS_save"
43447      else
43448        # This is an absolute path, we can use it without further modifications.
43449        new_path="$path"
43450      fi
43451
43452      if test "x$new_path" = x; then
43453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43454$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43455        has_space=`$ECHO "$complete" | $GREP " "`
43456        if test "x$has_space" != x; then
43457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43459        fi
43460        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43461      fi
43462    fi
43463
43464    # Now join together the path and the arguments once again
43465    if test "x$arguments" != xEOL; then
43466      new_complete="$new_path ${arguments% *}"
43467    else
43468      new_complete="$new_path"
43469    fi
43470
43471    if test "x$complete" != "x$new_complete"; then
43472      NM="$new_complete"
43473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43474$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43475    fi
43476  fi
43477
43478    GNM="$NM"
43479
43480  fi
43481
43482  # objcopy is used for moving debug symbols to separate files when
43483  # full debug symbols are enabled.
43484  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43485
43486
43487  # Publish this variable in the help.
43488
43489
43490  if [ -z "${OBJCOPY+x}" ]; then
43491    # The variable is not set by user, try to locate tool using the code snippet
43492    if test -n "$ac_tool_prefix"; then
43493  for ac_prog in gobjcopy objcopy
43494  do
43495    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43496set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43498$as_echo_n "checking for $ac_word... " >&6; }
43499if ${ac_cv_prog_OBJCOPY+:} false; then :
43500  $as_echo_n "(cached) " >&6
43501else
43502  if test -n "$OBJCOPY"; then
43503  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43504else
43505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43506for as_dir in $PATH
43507do
43508  IFS=$as_save_IFS
43509  test -z "$as_dir" && as_dir=.
43510    for ac_exec_ext in '' $ac_executable_extensions; do
43511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43512    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43514    break 2
43515  fi
43516done
43517  done
43518IFS=$as_save_IFS
43519
43520fi
43521fi
43522OBJCOPY=$ac_cv_prog_OBJCOPY
43523if test -n "$OBJCOPY"; then
43524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43525$as_echo "$OBJCOPY" >&6; }
43526else
43527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43528$as_echo "no" >&6; }
43529fi
43530
43531
43532    test -n "$OBJCOPY" && break
43533  done
43534fi
43535if test -z "$OBJCOPY"; then
43536  ac_ct_OBJCOPY=$OBJCOPY
43537  for ac_prog in gobjcopy objcopy
43538do
43539  # Extract the first word of "$ac_prog", so it can be a program name with args.
43540set dummy $ac_prog; ac_word=$2
43541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43542$as_echo_n "checking for $ac_word... " >&6; }
43543if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43544  $as_echo_n "(cached) " >&6
43545else
43546  if test -n "$ac_ct_OBJCOPY"; then
43547  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43548else
43549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43550for as_dir in $PATH
43551do
43552  IFS=$as_save_IFS
43553  test -z "$as_dir" && as_dir=.
43554    for ac_exec_ext in '' $ac_executable_extensions; do
43555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43556    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43558    break 2
43559  fi
43560done
43561  done
43562IFS=$as_save_IFS
43563
43564fi
43565fi
43566ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43567if test -n "$ac_ct_OBJCOPY"; then
43568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43569$as_echo "$ac_ct_OBJCOPY" >&6; }
43570else
43571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43572$as_echo "no" >&6; }
43573fi
43574
43575
43576  test -n "$ac_ct_OBJCOPY" && break
43577done
43578
43579  if test "x$ac_ct_OBJCOPY" = x; then
43580    OBJCOPY=""
43581  else
43582    case $cross_compiling:$ac_tool_warned in
43583yes:)
43584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43586ac_tool_warned=yes ;;
43587esac
43588    OBJCOPY=$ac_ct_OBJCOPY
43589  fi
43590fi
43591
43592  else
43593    # The variable is set, but is it from the command line or the environment?
43594
43595    # Try to remove the string !OBJCOPY! from our list.
43596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43598      # If it failed, the variable was not from the command line. Ignore it,
43599      # but warn the user (except for BASH, which is always set by the calling BASH).
43600      if test "xOBJCOPY" != xBASH; then
43601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43602$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43603      fi
43604      # Try to locate tool using the code snippet
43605      if test -n "$ac_tool_prefix"; then
43606  for ac_prog in gobjcopy objcopy
43607  do
43608    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43609set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43611$as_echo_n "checking for $ac_word... " >&6; }
43612if ${ac_cv_prog_OBJCOPY+:} false; then :
43613  $as_echo_n "(cached) " >&6
43614else
43615  if test -n "$OBJCOPY"; then
43616  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43617else
43618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43619for as_dir in $PATH
43620do
43621  IFS=$as_save_IFS
43622  test -z "$as_dir" && as_dir=.
43623    for ac_exec_ext in '' $ac_executable_extensions; do
43624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43625    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43627    break 2
43628  fi
43629done
43630  done
43631IFS=$as_save_IFS
43632
43633fi
43634fi
43635OBJCOPY=$ac_cv_prog_OBJCOPY
43636if test -n "$OBJCOPY"; then
43637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43638$as_echo "$OBJCOPY" >&6; }
43639else
43640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43641$as_echo "no" >&6; }
43642fi
43643
43644
43645    test -n "$OBJCOPY" && break
43646  done
43647fi
43648if test -z "$OBJCOPY"; then
43649  ac_ct_OBJCOPY=$OBJCOPY
43650  for ac_prog in gobjcopy objcopy
43651do
43652  # Extract the first word of "$ac_prog", so it can be a program name with args.
43653set dummy $ac_prog; ac_word=$2
43654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43655$as_echo_n "checking for $ac_word... " >&6; }
43656if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43657  $as_echo_n "(cached) " >&6
43658else
43659  if test -n "$ac_ct_OBJCOPY"; then
43660  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43661else
43662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43663for as_dir in $PATH
43664do
43665  IFS=$as_save_IFS
43666  test -z "$as_dir" && as_dir=.
43667    for ac_exec_ext in '' $ac_executable_extensions; do
43668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43669    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43671    break 2
43672  fi
43673done
43674  done
43675IFS=$as_save_IFS
43676
43677fi
43678fi
43679ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43680if test -n "$ac_ct_OBJCOPY"; then
43681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43682$as_echo "$ac_ct_OBJCOPY" >&6; }
43683else
43684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43685$as_echo "no" >&6; }
43686fi
43687
43688
43689  test -n "$ac_ct_OBJCOPY" && break
43690done
43691
43692  if test "x$ac_ct_OBJCOPY" = x; then
43693    OBJCOPY=""
43694  else
43695    case $cross_compiling:$ac_tool_warned in
43696yes:)
43697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43699ac_tool_warned=yes ;;
43700esac
43701    OBJCOPY=$ac_ct_OBJCOPY
43702  fi
43703fi
43704
43705    else
43706      # If it succeeded, then it was overridden by the user. We will use it
43707      # for the tool.
43708
43709      # First remove it from the list of overridden variables, so we can test
43710      # for unknown variables in the end.
43711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43712
43713      # Check if we try to supply an empty value
43714      if test "x$OBJCOPY" = x; then
43715        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43716$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43718$as_echo_n "checking for OBJCOPY... " >&6; }
43719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43720$as_echo "disabled" >&6; }
43721      else
43722        # Check if the provided tool contains a complete path.
43723        tool_specified="$OBJCOPY"
43724        tool_basename="${tool_specified##*/}"
43725        if test "x$tool_basename" = "x$tool_specified"; then
43726          # A command without a complete path is provided, search $PATH.
43727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43728$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43729          # Extract the first word of "$tool_basename", so it can be a program name with args.
43730set dummy $tool_basename; ac_word=$2
43731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43732$as_echo_n "checking for $ac_word... " >&6; }
43733if ${ac_cv_path_OBJCOPY+:} false; then :
43734  $as_echo_n "(cached) " >&6
43735else
43736  case $OBJCOPY in
43737  [\\/]* | ?:[\\/]*)
43738  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43739  ;;
43740  *)
43741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43742for as_dir in $PATH
43743do
43744  IFS=$as_save_IFS
43745  test -z "$as_dir" && as_dir=.
43746    for ac_exec_ext in '' $ac_executable_extensions; do
43747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43748    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43750    break 2
43751  fi
43752done
43753  done
43754IFS=$as_save_IFS
43755
43756  ;;
43757esac
43758fi
43759OBJCOPY=$ac_cv_path_OBJCOPY
43760if test -n "$OBJCOPY"; then
43761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43762$as_echo "$OBJCOPY" >&6; }
43763else
43764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43765$as_echo "no" >&6; }
43766fi
43767
43768
43769          if test "x$OBJCOPY" = x; then
43770            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43771          fi
43772        else
43773          # Otherwise we believe it is a complete path. Use it as it is.
43774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43775$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43776          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43777$as_echo_n "checking for OBJCOPY... " >&6; }
43778          if test ! -x "$tool_specified"; then
43779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43780$as_echo "not found" >&6; }
43781            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43782          fi
43783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43784$as_echo "$tool_specified" >&6; }
43785        fi
43786      fi
43787    fi
43788
43789  fi
43790
43791
43792    # Only call fixup if objcopy was found.
43793    if test -n "$OBJCOPY"; then
43794
43795  # Only process if variable expands to non-empty
43796
43797  if test "x$OBJCOPY" != x; then
43798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43799
43800  # First separate the path from the arguments. This will split at the first
43801  # space.
43802  complete="$OBJCOPY"
43803  path="${complete%% *}"
43804  tmp="$complete EOL"
43805  arguments="${tmp#* }"
43806
43807  # Input might be given as Windows format, start by converting to
43808  # unix format.
43809  new_path=`$CYGPATH -u "$path"`
43810
43811  # Now try to locate executable using which
43812  new_path=`$WHICH "$new_path" 2> /dev/null`
43813  # bat and cmd files are not always considered executable in cygwin causing which
43814  # to not find them
43815  if test "x$new_path" = x \
43816      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43817      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43818    new_path=`$CYGPATH -u "$path"`
43819  fi
43820  if test "x$new_path" = x; then
43821    # Oops. Which didn't find the executable.
43822    # The splitting of arguments from the executable at a space might have been incorrect,
43823    # since paths with space are more likely in Windows. Give it another try with the whole
43824    # argument.
43825    path="$complete"
43826    arguments="EOL"
43827    new_path=`$CYGPATH -u "$path"`
43828    new_path=`$WHICH "$new_path" 2> /dev/null`
43829    # bat and cmd files are not always considered executable in cygwin causing which
43830    # to not find them
43831    if test "x$new_path" = x \
43832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43834      new_path=`$CYGPATH -u "$path"`
43835    fi
43836    if test "x$new_path" = x; then
43837      # It's still not found. Now this is an unrecoverable error.
43838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43839$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43840      has_space=`$ECHO "$complete" | $GREP " "`
43841      if test "x$has_space" != x; then
43842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43844      fi
43845      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43846    fi
43847  fi
43848
43849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43852  # "foo.exe" is OK but "foo" is an error.
43853  #
43854  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43855  # It is also a way to make sure we got the proper file name for the real test later on.
43856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43857  if test "x$test_shortpath" = x; then
43858    # Short path failed, file does not exist as specified.
43859    # Try adding .exe or .cmd
43860    if test -f "${new_path}.exe"; then
43861      input_to_shortpath="${new_path}.exe"
43862    elif test -f "${new_path}.cmd"; then
43863      input_to_shortpath="${new_path}.cmd"
43864    else
43865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43866$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43867      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43868$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43869      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43870    fi
43871  else
43872    input_to_shortpath="$new_path"
43873  fi
43874
43875  # Call helper function which possibly converts this using DOS-style short mode.
43876  # If so, the updated path is stored in $new_path.
43877  new_path="$input_to_shortpath"
43878
43879  input_path="$input_to_shortpath"
43880  # Check if we need to convert this using DOS-style short mode. If the path
43881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43882  # take no chances and rewrite it.
43883  # Note: m4 eats our [], so we need to use [ and ] instead.
43884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43885  if test "x$has_forbidden_chars" != x; then
43886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43890      # Going to short mode and back again did indeed matter. Since short mode is
43891      # case insensitive, let's make it lowercase to improve readability.
43892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43893      # Now convert it back to Unix-style (cygpath)
43894      input_path=`$CYGPATH -u "$shortmode_path"`
43895      new_path="$input_path"
43896    fi
43897  fi
43898
43899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43900  if test "x$test_cygdrive_prefix" = x; then
43901    # As a simple fix, exclude /usr/bin since it's not a real path.
43902    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43904      # a path prefixed by /cygdrive for fixpath to work.
43905      new_path="$CYGWIN_ROOT_PATH$input_path"
43906    fi
43907  fi
43908
43909  # remove trailing .exe if any
43910  new_path="${new_path/%.exe/}"
43911
43912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43913
43914  # First separate the path from the arguments. This will split at the first
43915  # space.
43916  complete="$OBJCOPY"
43917  path="${complete%% *}"
43918  tmp="$complete EOL"
43919  arguments="${tmp#* }"
43920
43921  # Input might be given as Windows format, start by converting to
43922  # unix format.
43923  new_path="$path"
43924
43925  windows_path="$new_path"
43926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43927    unix_path=`$CYGPATH -u "$windows_path"`
43928    new_path="$unix_path"
43929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43931    new_path="$unix_path"
43932  fi
43933
43934
43935  # Now try to locate executable using which
43936  new_path=`$WHICH "$new_path" 2> /dev/null`
43937
43938  if test "x$new_path" = x; then
43939    # Oops. Which didn't find the executable.
43940    # The splitting of arguments from the executable at a space might have been incorrect,
43941    # since paths with space are more likely in Windows. Give it another try with the whole
43942    # argument.
43943    path="$complete"
43944    arguments="EOL"
43945    new_path="$path"
43946
43947  windows_path="$new_path"
43948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43949    unix_path=`$CYGPATH -u "$windows_path"`
43950    new_path="$unix_path"
43951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43953    new_path="$unix_path"
43954  fi
43955
43956
43957    new_path=`$WHICH "$new_path" 2> /dev/null`
43958    # bat and cmd files are not always considered executable in MSYS causing which
43959    # to not find them
43960    if test "x$new_path" = x \
43961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43963      new_path="$path"
43964
43965  windows_path="$new_path"
43966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43967    unix_path=`$CYGPATH -u "$windows_path"`
43968    new_path="$unix_path"
43969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43971    new_path="$unix_path"
43972  fi
43973
43974    fi
43975
43976    if test "x$new_path" = x; then
43977      # It's still not found. Now this is an unrecoverable error.
43978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43979$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43980      has_space=`$ECHO "$complete" | $GREP " "`
43981      if test "x$has_space" != x; then
43982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43984      fi
43985      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43986    fi
43987  fi
43988
43989  # Now new_path has a complete unix path to the binary
43990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43991    # Keep paths in /bin as-is, but remove trailing .exe if any
43992    new_path="${new_path/%.exe/}"
43993    # Do not save /bin paths to all_fixpath_prefixes!
43994  else
43995    # Not in mixed or Windows style, start by that.
43996    new_path=`cmd //c echo $new_path`
43997
43998  input_path="$new_path"
43999  # Check if we need to convert this using DOS-style short mode. If the path
44000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44001  # take no chances and rewrite it.
44002  # Note: m4 eats our [], so we need to use [ and ] instead.
44003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44004  if test "x$has_forbidden_chars" != x; then
44005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44007  fi
44008
44009    # Output is in $new_path
44010
44011  windows_path="$new_path"
44012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44013    unix_path=`$CYGPATH -u "$windows_path"`
44014    new_path="$unix_path"
44015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44017    new_path="$unix_path"
44018  fi
44019
44020    # remove trailing .exe if any
44021    new_path="${new_path/%.exe/}"
44022
44023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44025  fi
44026
44027    else
44028      # We're on a unix platform. Hooray! :)
44029      # First separate the path from the arguments. This will split at the first
44030      # space.
44031      complete="$OBJCOPY"
44032      path="${complete%% *}"
44033      tmp="$complete EOL"
44034      arguments="${tmp#* }"
44035
44036      # Cannot rely on the command "which" here since it doesn't always work.
44037      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44038      if test -z "$is_absolute_path"; then
44039        # Path to executable is not absolute. Find it.
44040        IFS_save="$IFS"
44041        IFS=:
44042        for p in $PATH; do
44043          if test -f "$p/$path" && test -x "$p/$path"; then
44044            new_path="$p/$path"
44045            break
44046          fi
44047        done
44048        IFS="$IFS_save"
44049      else
44050        # This is an absolute path, we can use it without further modifications.
44051        new_path="$path"
44052      fi
44053
44054      if test "x$new_path" = x; then
44055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44056$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44057        has_space=`$ECHO "$complete" | $GREP " "`
44058        if test "x$has_space" != x; then
44059          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44060$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44061        fi
44062        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44063      fi
44064    fi
44065
44066    # Now join together the path and the arguments once again
44067    if test "x$arguments" != xEOL; then
44068      new_complete="$new_path ${arguments% *}"
44069    else
44070      new_complete="$new_path"
44071    fi
44072
44073    if test "x$complete" != "x$new_complete"; then
44074      OBJCOPY="$new_complete"
44075      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44076$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44077    fi
44078  fi
44079
44080      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44081        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44082        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44083        # - version number is last blank separate word on first line
44084        # - version number formats that have been seen:
44085        #   - <major>.<minor>
44086        #   - <major>.<minor>.<micro>
44087        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44088        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44089         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44090              -e 's/.* //' \
44091              -e '/^[01]\./b bad' \
44092              -e '/^2\./{' \
44093              -e '  s/^2\.//' \
44094              -e '  /^[0-9]$/b bad' \
44095              -e '  /^[0-9]\./b bad' \
44096              -e '  /^1[0-9]$/b bad' \
44097              -e '  /^1[0-9]\./b bad' \
44098              -e '  /^20\./b bad' \
44099              -e '  /^21\.0$/b bad' \
44100              -e '  /^21\.0\./b bad' \
44101              -e '}' \
44102              -e ':good' \
44103              -e 's/.*/VALID_VERSION/p' \
44104              -e 'q' \
44105              -e ':bad' \
44106              -e 's/.*/BAD_VERSION/p' \
44107              -e 'q'`
44108        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44109          OBJCOPY=
44110          { $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
44111$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44112          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44113$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44114          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44115$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44116          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44117$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44118          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44119$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44120        fi
44121      fi
44122    fi
44123  fi
44124
44125
44126
44127  # Publish this variable in the help.
44128
44129
44130  if [ -z "${OBJDUMP+x}" ]; then
44131    # The variable is not set by user, try to locate tool using the code snippet
44132    if test -n "$ac_tool_prefix"; then
44133  for ac_prog in gobjdump objdump
44134  do
44135    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44136set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44138$as_echo_n "checking for $ac_word... " >&6; }
44139if ${ac_cv_prog_OBJDUMP+:} false; then :
44140  $as_echo_n "(cached) " >&6
44141else
44142  if test -n "$OBJDUMP"; then
44143  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44144else
44145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44146for as_dir in $PATH
44147do
44148  IFS=$as_save_IFS
44149  test -z "$as_dir" && as_dir=.
44150    for ac_exec_ext in '' $ac_executable_extensions; do
44151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44152    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44154    break 2
44155  fi
44156done
44157  done
44158IFS=$as_save_IFS
44159
44160fi
44161fi
44162OBJDUMP=$ac_cv_prog_OBJDUMP
44163if test -n "$OBJDUMP"; then
44164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44165$as_echo "$OBJDUMP" >&6; }
44166else
44167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44168$as_echo "no" >&6; }
44169fi
44170
44171
44172    test -n "$OBJDUMP" && break
44173  done
44174fi
44175if test -z "$OBJDUMP"; then
44176  ac_ct_OBJDUMP=$OBJDUMP
44177  for ac_prog in gobjdump objdump
44178do
44179  # Extract the first word of "$ac_prog", so it can be a program name with args.
44180set dummy $ac_prog; 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_prog_ac_ct_OBJDUMP+:} false; then :
44184  $as_echo_n "(cached) " >&6
44185else
44186  if test -n "$ac_ct_OBJDUMP"; then
44187  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44188else
44189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44190for as_dir in $PATH
44191do
44192  IFS=$as_save_IFS
44193  test -z "$as_dir" && as_dir=.
44194    for ac_exec_ext in '' $ac_executable_extensions; do
44195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44196    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44198    break 2
44199  fi
44200done
44201  done
44202IFS=$as_save_IFS
44203
44204fi
44205fi
44206ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44207if test -n "$ac_ct_OBJDUMP"; then
44208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44209$as_echo "$ac_ct_OBJDUMP" >&6; }
44210else
44211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44212$as_echo "no" >&6; }
44213fi
44214
44215
44216  test -n "$ac_ct_OBJDUMP" && break
44217done
44218
44219  if test "x$ac_ct_OBJDUMP" = x; then
44220    OBJDUMP=""
44221  else
44222    case $cross_compiling:$ac_tool_warned in
44223yes:)
44224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44226ac_tool_warned=yes ;;
44227esac
44228    OBJDUMP=$ac_ct_OBJDUMP
44229  fi
44230fi
44231
44232  else
44233    # The variable is set, but is it from the command line or the environment?
44234
44235    # Try to remove the string !OBJDUMP! from our list.
44236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44238      # If it failed, the variable was not from the command line. Ignore it,
44239      # but warn the user (except for BASH, which is always set by the calling BASH).
44240      if test "xOBJDUMP" != xBASH; then
44241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44242$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44243      fi
44244      # Try to locate tool using the code snippet
44245      if test -n "$ac_tool_prefix"; then
44246  for ac_prog in gobjdump objdump
44247  do
44248    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44249set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44251$as_echo_n "checking for $ac_word... " >&6; }
44252if ${ac_cv_prog_OBJDUMP+:} false; then :
44253  $as_echo_n "(cached) " >&6
44254else
44255  if test -n "$OBJDUMP"; then
44256  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44257else
44258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44259for as_dir in $PATH
44260do
44261  IFS=$as_save_IFS
44262  test -z "$as_dir" && as_dir=.
44263    for ac_exec_ext in '' $ac_executable_extensions; do
44264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44265    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44267    break 2
44268  fi
44269done
44270  done
44271IFS=$as_save_IFS
44272
44273fi
44274fi
44275OBJDUMP=$ac_cv_prog_OBJDUMP
44276if test -n "$OBJDUMP"; then
44277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44278$as_echo "$OBJDUMP" >&6; }
44279else
44280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44281$as_echo "no" >&6; }
44282fi
44283
44284
44285    test -n "$OBJDUMP" && break
44286  done
44287fi
44288if test -z "$OBJDUMP"; then
44289  ac_ct_OBJDUMP=$OBJDUMP
44290  for ac_prog in gobjdump objdump
44291do
44292  # Extract the first word of "$ac_prog", so it can be a program name with args.
44293set dummy $ac_prog; ac_word=$2
44294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44295$as_echo_n "checking for $ac_word... " >&6; }
44296if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44297  $as_echo_n "(cached) " >&6
44298else
44299  if test -n "$ac_ct_OBJDUMP"; then
44300  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44301else
44302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44303for as_dir in $PATH
44304do
44305  IFS=$as_save_IFS
44306  test -z "$as_dir" && as_dir=.
44307    for ac_exec_ext in '' $ac_executable_extensions; do
44308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44309    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44311    break 2
44312  fi
44313done
44314  done
44315IFS=$as_save_IFS
44316
44317fi
44318fi
44319ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44320if test -n "$ac_ct_OBJDUMP"; then
44321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44322$as_echo "$ac_ct_OBJDUMP" >&6; }
44323else
44324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44325$as_echo "no" >&6; }
44326fi
44327
44328
44329  test -n "$ac_ct_OBJDUMP" && break
44330done
44331
44332  if test "x$ac_ct_OBJDUMP" = x; then
44333    OBJDUMP=""
44334  else
44335    case $cross_compiling:$ac_tool_warned in
44336yes:)
44337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44339ac_tool_warned=yes ;;
44340esac
44341    OBJDUMP=$ac_ct_OBJDUMP
44342  fi
44343fi
44344
44345    else
44346      # If it succeeded, then it was overridden by the user. We will use it
44347      # for the tool.
44348
44349      # First remove it from the list of overridden variables, so we can test
44350      # for unknown variables in the end.
44351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44352
44353      # Check if we try to supply an empty value
44354      if test "x$OBJDUMP" = x; then
44355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44356$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44358$as_echo_n "checking for OBJDUMP... " >&6; }
44359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44360$as_echo "disabled" >&6; }
44361      else
44362        # Check if the provided tool contains a complete path.
44363        tool_specified="$OBJDUMP"
44364        tool_basename="${tool_specified##*/}"
44365        if test "x$tool_basename" = "x$tool_specified"; then
44366          # A command without a complete path is provided, search $PATH.
44367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44368$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44369          # Extract the first word of "$tool_basename", so it can be a program name with args.
44370set dummy $tool_basename; ac_word=$2
44371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44372$as_echo_n "checking for $ac_word... " >&6; }
44373if ${ac_cv_path_OBJDUMP+:} false; then :
44374  $as_echo_n "(cached) " >&6
44375else
44376  case $OBJDUMP in
44377  [\\/]* | ?:[\\/]*)
44378  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44379  ;;
44380  *)
44381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44382for as_dir in $PATH
44383do
44384  IFS=$as_save_IFS
44385  test -z "$as_dir" && as_dir=.
44386    for ac_exec_ext in '' $ac_executable_extensions; do
44387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44388    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44390    break 2
44391  fi
44392done
44393  done
44394IFS=$as_save_IFS
44395
44396  ;;
44397esac
44398fi
44399OBJDUMP=$ac_cv_path_OBJDUMP
44400if test -n "$OBJDUMP"; then
44401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44402$as_echo "$OBJDUMP" >&6; }
44403else
44404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44405$as_echo "no" >&6; }
44406fi
44407
44408
44409          if test "x$OBJDUMP" = x; then
44410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44411          fi
44412        else
44413          # Otherwise we believe it is a complete path. Use it as it is.
44414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44415$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44417$as_echo_n "checking for OBJDUMP... " >&6; }
44418          if test ! -x "$tool_specified"; then
44419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44420$as_echo "not found" >&6; }
44421            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44422          fi
44423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44424$as_echo "$tool_specified" >&6; }
44425        fi
44426      fi
44427    fi
44428
44429  fi
44430
44431
44432  if test "x$OBJDUMP" != x; then
44433    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44434    # bails if argument is missing.
44435
44436  # Only process if variable expands to non-empty
44437
44438  if test "x$OBJDUMP" != x; then
44439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44440
44441  # First separate the path from the arguments. This will split at the first
44442  # space.
44443  complete="$OBJDUMP"
44444  path="${complete%% *}"
44445  tmp="$complete EOL"
44446  arguments="${tmp#* }"
44447
44448  # Input might be given as Windows format, start by converting to
44449  # unix format.
44450  new_path=`$CYGPATH -u "$path"`
44451
44452  # Now try to locate executable using which
44453  new_path=`$WHICH "$new_path" 2> /dev/null`
44454  # bat and cmd files are not always considered executable in cygwin causing which
44455  # to not find them
44456  if test "x$new_path" = x \
44457      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44458      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44459    new_path=`$CYGPATH -u "$path"`
44460  fi
44461  if test "x$new_path" = x; then
44462    # Oops. Which didn't find the executable.
44463    # The splitting of arguments from the executable at a space might have been incorrect,
44464    # since paths with space are more likely in Windows. Give it another try with the whole
44465    # argument.
44466    path="$complete"
44467    arguments="EOL"
44468    new_path=`$CYGPATH -u "$path"`
44469    new_path=`$WHICH "$new_path" 2> /dev/null`
44470    # bat and cmd files are not always considered executable in cygwin causing which
44471    # to not find them
44472    if test "x$new_path" = x \
44473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44475      new_path=`$CYGPATH -u "$path"`
44476    fi
44477    if test "x$new_path" = x; then
44478      # It's still not found. Now this is an unrecoverable error.
44479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44480$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44481      has_space=`$ECHO "$complete" | $GREP " "`
44482      if test "x$has_space" != x; then
44483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44485      fi
44486      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44487    fi
44488  fi
44489
44490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44493  # "foo.exe" is OK but "foo" is an error.
44494  #
44495  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44496  # It is also a way to make sure we got the proper file name for the real test later on.
44497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44498  if test "x$test_shortpath" = x; then
44499    # Short path failed, file does not exist as specified.
44500    # Try adding .exe or .cmd
44501    if test -f "${new_path}.exe"; then
44502      input_to_shortpath="${new_path}.exe"
44503    elif test -f "${new_path}.cmd"; then
44504      input_to_shortpath="${new_path}.cmd"
44505    else
44506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44507$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44508      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44509$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44510      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44511    fi
44512  else
44513    input_to_shortpath="$new_path"
44514  fi
44515
44516  # Call helper function which possibly converts this using DOS-style short mode.
44517  # If so, the updated path is stored in $new_path.
44518  new_path="$input_to_shortpath"
44519
44520  input_path="$input_to_shortpath"
44521  # Check if we need to convert this using DOS-style short mode. If the path
44522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44523  # take no chances and rewrite it.
44524  # Note: m4 eats our [], so we need to use [ and ] instead.
44525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44526  if test "x$has_forbidden_chars" != x; then
44527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44531      # Going to short mode and back again did indeed matter. Since short mode is
44532      # case insensitive, let's make it lowercase to improve readability.
44533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44534      # Now convert it back to Unix-style (cygpath)
44535      input_path=`$CYGPATH -u "$shortmode_path"`
44536      new_path="$input_path"
44537    fi
44538  fi
44539
44540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44541  if test "x$test_cygdrive_prefix" = x; then
44542    # As a simple fix, exclude /usr/bin since it's not a real path.
44543    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44545      # a path prefixed by /cygdrive for fixpath to work.
44546      new_path="$CYGWIN_ROOT_PATH$input_path"
44547    fi
44548  fi
44549
44550  # remove trailing .exe if any
44551  new_path="${new_path/%.exe/}"
44552
44553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44554
44555  # First separate the path from the arguments. This will split at the first
44556  # space.
44557  complete="$OBJDUMP"
44558  path="${complete%% *}"
44559  tmp="$complete EOL"
44560  arguments="${tmp#* }"
44561
44562  # Input might be given as Windows format, start by converting to
44563  # unix format.
44564  new_path="$path"
44565
44566  windows_path="$new_path"
44567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44568    unix_path=`$CYGPATH -u "$windows_path"`
44569    new_path="$unix_path"
44570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44572    new_path="$unix_path"
44573  fi
44574
44575
44576  # Now try to locate executable using which
44577  new_path=`$WHICH "$new_path" 2> /dev/null`
44578
44579  if test "x$new_path" = x; then
44580    # Oops. Which didn't find the executable.
44581    # The splitting of arguments from the executable at a space might have been incorrect,
44582    # since paths with space are more likely in Windows. Give it another try with the whole
44583    # argument.
44584    path="$complete"
44585    arguments="EOL"
44586    new_path="$path"
44587
44588  windows_path="$new_path"
44589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44590    unix_path=`$CYGPATH -u "$windows_path"`
44591    new_path="$unix_path"
44592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44594    new_path="$unix_path"
44595  fi
44596
44597
44598    new_path=`$WHICH "$new_path" 2> /dev/null`
44599    # bat and cmd files are not always considered executable in MSYS causing which
44600    # to not find them
44601    if test "x$new_path" = x \
44602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44604      new_path="$path"
44605
44606  windows_path="$new_path"
44607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44608    unix_path=`$CYGPATH -u "$windows_path"`
44609    new_path="$unix_path"
44610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44612    new_path="$unix_path"
44613  fi
44614
44615    fi
44616
44617    if test "x$new_path" = x; then
44618      # It's still not found. Now this is an unrecoverable error.
44619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44620$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44621      has_space=`$ECHO "$complete" | $GREP " "`
44622      if test "x$has_space" != x; then
44623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44625      fi
44626      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44627    fi
44628  fi
44629
44630  # Now new_path has a complete unix path to the binary
44631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44632    # Keep paths in /bin as-is, but remove trailing .exe if any
44633    new_path="${new_path/%.exe/}"
44634    # Do not save /bin paths to all_fixpath_prefixes!
44635  else
44636    # Not in mixed or Windows style, start by that.
44637    new_path=`cmd //c echo $new_path`
44638
44639  input_path="$new_path"
44640  # Check if we need to convert this using DOS-style short mode. If the path
44641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44642  # take no chances and rewrite it.
44643  # Note: m4 eats our [], so we need to use [ and ] instead.
44644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44645  if test "x$has_forbidden_chars" != x; then
44646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44648  fi
44649
44650    # Output is in $new_path
44651
44652  windows_path="$new_path"
44653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44654    unix_path=`$CYGPATH -u "$windows_path"`
44655    new_path="$unix_path"
44656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44658    new_path="$unix_path"
44659  fi
44660
44661    # remove trailing .exe if any
44662    new_path="${new_path/%.exe/}"
44663
44664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44666  fi
44667
44668    else
44669      # We're on a unix platform. Hooray! :)
44670      # First separate the path from the arguments. This will split at the first
44671      # space.
44672      complete="$OBJDUMP"
44673      path="${complete%% *}"
44674      tmp="$complete EOL"
44675      arguments="${tmp#* }"
44676
44677      # Cannot rely on the command "which" here since it doesn't always work.
44678      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44679      if test -z "$is_absolute_path"; then
44680        # Path to executable is not absolute. Find it.
44681        IFS_save="$IFS"
44682        IFS=:
44683        for p in $PATH; do
44684          if test -f "$p/$path" && test -x "$p/$path"; then
44685            new_path="$p/$path"
44686            break
44687          fi
44688        done
44689        IFS="$IFS_save"
44690      else
44691        # This is an absolute path, we can use it without further modifications.
44692        new_path="$path"
44693      fi
44694
44695      if test "x$new_path" = x; then
44696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44697$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44698        has_space=`$ECHO "$complete" | $GREP " "`
44699        if test "x$has_space" != x; then
44700          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44701$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44702        fi
44703        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44704      fi
44705    fi
44706
44707    # Now join together the path and the arguments once again
44708    if test "x$arguments" != xEOL; then
44709      new_complete="$new_path ${arguments% *}"
44710    else
44711      new_complete="$new_path"
44712    fi
44713
44714    if test "x$complete" != "x$new_complete"; then
44715      OBJDUMP="$new_complete"
44716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44717$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44718    fi
44719  fi
44720
44721  fi
44722
44723
44724  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44725  # to remain in place. Otherwise the compiler will not work in some siutations
44726  # in later configure checks.
44727  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44728    PATH="$OLD_PATH"
44729  fi
44730
44731  # Restore the flags to the user specified values.
44732  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44733  CFLAGS="$ORG_CFLAGS"
44734  CXXFLAGS="$ORG_CXXFLAGS"
44735
44736
44737# Finally do some processing after the detection phase
44738
44739  if test "x$COMPILE_TYPE" = "xcross"; then
44740    # Now we need to find a C/C++ compiler that can build executables for the
44741    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44742    # used once. Also, we need to do this without adding a tools dir to the
44743    # path, otherwise we might pick up cross-compilers which don't use standard
44744    # naming.
44745
44746    OLDPATH="$PATH"
44747
44748
44749# Check whether --with-build-devkit was given.
44750if test "${with_build_devkit+set}" = set; then :
44751  withval=$with_build_devkit;
44752fi
44753
44754    if test "x$with_build_devkit" = "xyes"; then
44755      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44756    elif test -n "$with_build_devkit"; then
44757      if test ! -d "$with_build_devkit"; then
44758        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44759      else
44760
44761  # Only process if variable expands to non-empty
44762
44763  if test "x$with_build_devkit" != x; then
44764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44765
44766  # Input might be given as Windows format, start by converting to
44767  # unix format.
44768  path="$with_build_devkit"
44769  new_path=`$CYGPATH -u "$path"`
44770
44771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44774  # "foo.exe" is OK but "foo" is an error.
44775  #
44776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44777  # It is also a way to make sure we got the proper file name for the real test later on.
44778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44779  if test "x$test_shortpath" = x; then
44780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44781$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44782    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44783  fi
44784
44785  # Call helper function which possibly converts this using DOS-style short mode.
44786  # If so, the updated path is stored in $new_path.
44787
44788  input_path="$new_path"
44789  # Check if we need to convert this using DOS-style short mode. If the path
44790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44791  # take no chances and rewrite it.
44792  # Note: m4 eats our [], so we need to use [ and ] instead.
44793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44794  if test "x$has_forbidden_chars" != x; then
44795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44799      # Going to short mode and back again did indeed matter. Since short mode is
44800      # case insensitive, let's make it lowercase to improve readability.
44801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44802      # Now convert it back to Unix-style (cygpath)
44803      input_path=`$CYGPATH -u "$shortmode_path"`
44804      new_path="$input_path"
44805    fi
44806  fi
44807
44808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44809  if test "x$test_cygdrive_prefix" = x; then
44810    # As a simple fix, exclude /usr/bin since it's not a real path.
44811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44813      # a path prefixed by /cygdrive for fixpath to work.
44814      new_path="$CYGWIN_ROOT_PATH$input_path"
44815    fi
44816  fi
44817
44818
44819  if test "x$path" != "x$new_path"; then
44820    with_build_devkit="$new_path"
44821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44822$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44823  fi
44824
44825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44826
44827  path="$with_build_devkit"
44828  has_colon=`$ECHO $path | $GREP ^.:`
44829  new_path="$path"
44830  if test "x$has_colon" = x; then
44831    # Not in mixed or Windows style, start by that.
44832    new_path=`cmd //c echo $path`
44833  fi
44834
44835
44836  input_path="$new_path"
44837  # Check if we need to convert this using DOS-style short mode. If the path
44838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44839  # take no chances and rewrite it.
44840  # Note: m4 eats our [], so we need to use [ and ] instead.
44841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44842  if test "x$has_forbidden_chars" != x; then
44843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44845  fi
44846
44847
44848  windows_path="$new_path"
44849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44850    unix_path=`$CYGPATH -u "$windows_path"`
44851    new_path="$unix_path"
44852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44854    new_path="$unix_path"
44855  fi
44856
44857  if test "x$path" != "x$new_path"; then
44858    with_build_devkit="$new_path"
44859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44860$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44861  fi
44862
44863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44865
44866    else
44867      # We're on a unix platform. Hooray! :)
44868      path="$with_build_devkit"
44869      has_space=`$ECHO "$path" | $GREP " "`
44870      if test "x$has_space" != x; then
44871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44872$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44873        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44874      fi
44875
44876      # Use eval to expand a potential ~
44877      eval path="$path"
44878      if test ! -f "$path" && test ! -d "$path"; then
44879        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44880      fi
44881
44882      if test -d "$path"; then
44883        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44884      else
44885        dir="`$DIRNAME "$path"`"
44886        base="`$BASENAME "$path"`"
44887        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44888      fi
44889    fi
44890  fi
44891
44892        BUILD_DEVKIT_ROOT="$with_build_devkit"
44893        # Check for a meta data info file in the root of the devkit
44894        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44895          # Process devkit.info so that existing devkit variables are not
44896          # modified by this
44897          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44898              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44899              -e "s/\$host/\$build/g" \
44900              $BUILD_DEVKIT_ROOT/devkit.info \
44901              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44902          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44903          # This potentially sets the following:
44904          # A descriptive name of the devkit
44905
44906  if test "x$BUILD_DEVKIT_NAME" = x; then
44907    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44908  fi
44909
44910          # Corresponds to --with-extra-path
44911
44912  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44913    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44914  fi
44915
44916          # Corresponds to --with-toolchain-path
44917
44918  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44919    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44920  fi
44921
44922          # Corresponds to --with-sysroot
44923
44924  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44925    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44926  fi
44927
44928          # Skip the Window specific parts
44929        fi
44930
44931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44932$as_echo_n "checking for build platform devkit... " >&6; }
44933        if test "x$BUILD_DEVKIT_NAME" != x; then
44934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44935$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44936        else
44937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44938$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44939        fi
44940
44941        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44942
44943  if test "x$BUILD_SYSROOT" != "x"; then
44944    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44945      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44946        # Solaris Studio does not have a concept of sysroot. Instead we must
44947        # make sure the default include and lib dirs are appended to each
44948        # compile and link command line. Must also add -I-xbuiltin to enable
44949        # inlining of system functions and intrinsics.
44950        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44951        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44952            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44953      fi
44954    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44955      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44956      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44957    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44958      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44959      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44960    fi
44961    # The global CFLAGS and LDFLAGS variables need these for configure to function
44962    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44963    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44964    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44965    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44966  fi
44967
44968  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44969    # We also need -iframework<path>/System/Library/Frameworks
44970    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44971    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44972    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44973    # set this here so it doesn't have to be peppered throughout the forest
44974    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44975    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44976  fi
44977
44978
44979
44980
44981
44982         # Fallback default of just /bin if DEVKIT_PATH is not defined
44983        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44984          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44985        fi
44986        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44987      fi
44988    fi
44989
44990    # FIXME: we should list the discovered compilers as an exclude pattern!
44991    # If we do that, we can do this detection before POST_DETECTION, and still
44992    # find the build compilers in the tools dir, if needed.
44993
44994
44995
44996  # Publish this variable in the help.
44997
44998
44999  if [ -z "${BUILD_CC+x}" ]; then
45000    # The variable is not set by user, try to locate tool using the code snippet
45001    for ac_prog in cl cc gcc
45002do
45003  # Extract the first word of "$ac_prog", so it can be a program name with args.
45004set dummy $ac_prog; ac_word=$2
45005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45006$as_echo_n "checking for $ac_word... " >&6; }
45007if ${ac_cv_path_BUILD_CC+:} false; then :
45008  $as_echo_n "(cached) " >&6
45009else
45010  case $BUILD_CC in
45011  [\\/]* | ?:[\\/]*)
45012  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45013  ;;
45014  *)
45015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45016for as_dir in $PATH
45017do
45018  IFS=$as_save_IFS
45019  test -z "$as_dir" && as_dir=.
45020    for ac_exec_ext in '' $ac_executable_extensions; do
45021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45022    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45024    break 2
45025  fi
45026done
45027  done
45028IFS=$as_save_IFS
45029
45030  ;;
45031esac
45032fi
45033BUILD_CC=$ac_cv_path_BUILD_CC
45034if test -n "$BUILD_CC"; then
45035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45036$as_echo "$BUILD_CC" >&6; }
45037else
45038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45039$as_echo "no" >&6; }
45040fi
45041
45042
45043  test -n "$BUILD_CC" && break
45044done
45045
45046  else
45047    # The variable is set, but is it from the command line or the environment?
45048
45049    # Try to remove the string !BUILD_CC! from our list.
45050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45052      # If it failed, the variable was not from the command line. Ignore it,
45053      # but warn the user (except for BASH, which is always set by the calling BASH).
45054      if test "xBUILD_CC" != xBASH; then
45055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45056$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45057      fi
45058      # Try to locate tool using the code snippet
45059      for ac_prog in cl cc gcc
45060do
45061  # Extract the first word of "$ac_prog", so it can be a program name with args.
45062set dummy $ac_prog; ac_word=$2
45063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45064$as_echo_n "checking for $ac_word... " >&6; }
45065if ${ac_cv_path_BUILD_CC+:} false; then :
45066  $as_echo_n "(cached) " >&6
45067else
45068  case $BUILD_CC in
45069  [\\/]* | ?:[\\/]*)
45070  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45071  ;;
45072  *)
45073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45074for as_dir in $PATH
45075do
45076  IFS=$as_save_IFS
45077  test -z "$as_dir" && as_dir=.
45078    for ac_exec_ext in '' $ac_executable_extensions; do
45079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45080    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45082    break 2
45083  fi
45084done
45085  done
45086IFS=$as_save_IFS
45087
45088  ;;
45089esac
45090fi
45091BUILD_CC=$ac_cv_path_BUILD_CC
45092if test -n "$BUILD_CC"; then
45093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45094$as_echo "$BUILD_CC" >&6; }
45095else
45096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45097$as_echo "no" >&6; }
45098fi
45099
45100
45101  test -n "$BUILD_CC" && break
45102done
45103
45104    else
45105      # If it succeeded, then it was overridden by the user. We will use it
45106      # for the tool.
45107
45108      # First remove it from the list of overridden variables, so we can test
45109      # for unknown variables in the end.
45110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45111
45112      # Check if we try to supply an empty value
45113      if test "x$BUILD_CC" = x; then
45114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45115$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45117$as_echo_n "checking for BUILD_CC... " >&6; }
45118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45119$as_echo "disabled" >&6; }
45120      else
45121        # Check if the provided tool contains a complete path.
45122        tool_specified="$BUILD_CC"
45123        tool_basename="${tool_specified##*/}"
45124        if test "x$tool_basename" = "x$tool_specified"; then
45125          # A command without a complete path is provided, search $PATH.
45126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45127$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45128          # Extract the first word of "$tool_basename", so it can be a program name with args.
45129set dummy $tool_basename; ac_word=$2
45130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45131$as_echo_n "checking for $ac_word... " >&6; }
45132if ${ac_cv_path_BUILD_CC+:} false; then :
45133  $as_echo_n "(cached) " >&6
45134else
45135  case $BUILD_CC in
45136  [\\/]* | ?:[\\/]*)
45137  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45138  ;;
45139  *)
45140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45141for as_dir in $PATH
45142do
45143  IFS=$as_save_IFS
45144  test -z "$as_dir" && as_dir=.
45145    for ac_exec_ext in '' $ac_executable_extensions; do
45146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45147    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45149    break 2
45150  fi
45151done
45152  done
45153IFS=$as_save_IFS
45154
45155  ;;
45156esac
45157fi
45158BUILD_CC=$ac_cv_path_BUILD_CC
45159if test -n "$BUILD_CC"; then
45160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45161$as_echo "$BUILD_CC" >&6; }
45162else
45163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45164$as_echo "no" >&6; }
45165fi
45166
45167
45168          if test "x$BUILD_CC" = x; then
45169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45170          fi
45171        else
45172          # Otherwise we believe it is a complete path. Use it as it is.
45173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45174$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45176$as_echo_n "checking for BUILD_CC... " >&6; }
45177          if test ! -x "$tool_specified"; then
45178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45179$as_echo "not found" >&6; }
45180            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45181          fi
45182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45183$as_echo "$tool_specified" >&6; }
45184        fi
45185      fi
45186    fi
45187
45188  fi
45189
45190
45191
45192  if test "x$BUILD_CC" = x; then
45193    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45194  fi
45195
45196
45197
45198  # Only process if variable expands to non-empty
45199
45200  if test "x$BUILD_CC" != x; then
45201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45202
45203  # First separate the path from the arguments. This will split at the first
45204  # space.
45205  complete="$BUILD_CC"
45206  path="${complete%% *}"
45207  tmp="$complete EOL"
45208  arguments="${tmp#* }"
45209
45210  # Input might be given as Windows format, start by converting to
45211  # unix format.
45212  new_path=`$CYGPATH -u "$path"`
45213
45214  # Now try to locate executable using which
45215  new_path=`$WHICH "$new_path" 2> /dev/null`
45216  # bat and cmd files are not always considered executable in cygwin causing which
45217  # to not find them
45218  if test "x$new_path" = x \
45219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45221    new_path=`$CYGPATH -u "$path"`
45222  fi
45223  if test "x$new_path" = x; then
45224    # Oops. Which didn't find the executable.
45225    # The splitting of arguments from the executable at a space might have been incorrect,
45226    # since paths with space are more likely in Windows. Give it another try with the whole
45227    # argument.
45228    path="$complete"
45229    arguments="EOL"
45230    new_path=`$CYGPATH -u "$path"`
45231    new_path=`$WHICH "$new_path" 2> /dev/null`
45232    # bat and cmd files are not always considered executable in cygwin causing which
45233    # to not find them
45234    if test "x$new_path" = x \
45235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45237      new_path=`$CYGPATH -u "$path"`
45238    fi
45239    if test "x$new_path" = x; then
45240      # It's still not found. Now this is an unrecoverable error.
45241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45242$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45243      has_space=`$ECHO "$complete" | $GREP " "`
45244      if test "x$has_space" != x; then
45245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45247      fi
45248      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45249    fi
45250  fi
45251
45252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45255  # "foo.exe" is OK but "foo" is an error.
45256  #
45257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45258  # It is also a way to make sure we got the proper file name for the real test later on.
45259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45260  if test "x$test_shortpath" = x; then
45261    # Short path failed, file does not exist as specified.
45262    # Try adding .exe or .cmd
45263    if test -f "${new_path}.exe"; then
45264      input_to_shortpath="${new_path}.exe"
45265    elif test -f "${new_path}.cmd"; then
45266      input_to_shortpath="${new_path}.cmd"
45267    else
45268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45269$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45272      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45273    fi
45274  else
45275    input_to_shortpath="$new_path"
45276  fi
45277
45278  # Call helper function which possibly converts this using DOS-style short mode.
45279  # If so, the updated path is stored in $new_path.
45280  new_path="$input_to_shortpath"
45281
45282  input_path="$input_to_shortpath"
45283  # Check if we need to convert this using DOS-style short mode. If the path
45284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45285  # take no chances and rewrite it.
45286  # Note: m4 eats our [], so we need to use [ and ] instead.
45287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45288  if test "x$has_forbidden_chars" != x; then
45289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45293      # Going to short mode and back again did indeed matter. Since short mode is
45294      # case insensitive, let's make it lowercase to improve readability.
45295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45296      # Now convert it back to Unix-style (cygpath)
45297      input_path=`$CYGPATH -u "$shortmode_path"`
45298      new_path="$input_path"
45299    fi
45300  fi
45301
45302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45303  if test "x$test_cygdrive_prefix" = x; then
45304    # As a simple fix, exclude /usr/bin since it's not a real path.
45305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45307      # a path prefixed by /cygdrive for fixpath to work.
45308      new_path="$CYGWIN_ROOT_PATH$input_path"
45309    fi
45310  fi
45311
45312  # remove trailing .exe if any
45313  new_path="${new_path/%.exe/}"
45314
45315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45316
45317  # First separate the path from the arguments. This will split at the first
45318  # space.
45319  complete="$BUILD_CC"
45320  path="${complete%% *}"
45321  tmp="$complete EOL"
45322  arguments="${tmp#* }"
45323
45324  # Input might be given as Windows format, start by converting to
45325  # unix format.
45326  new_path="$path"
45327
45328  windows_path="$new_path"
45329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45330    unix_path=`$CYGPATH -u "$windows_path"`
45331    new_path="$unix_path"
45332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45334    new_path="$unix_path"
45335  fi
45336
45337
45338  # Now try to locate executable using which
45339  new_path=`$WHICH "$new_path" 2> /dev/null`
45340
45341  if test "x$new_path" = x; then
45342    # Oops. Which didn't find the executable.
45343    # The splitting of arguments from the executable at a space might have been incorrect,
45344    # since paths with space are more likely in Windows. Give it another try with the whole
45345    # argument.
45346    path="$complete"
45347    arguments="EOL"
45348    new_path="$path"
45349
45350  windows_path="$new_path"
45351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45352    unix_path=`$CYGPATH -u "$windows_path"`
45353    new_path="$unix_path"
45354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45356    new_path="$unix_path"
45357  fi
45358
45359
45360    new_path=`$WHICH "$new_path" 2> /dev/null`
45361    # bat and cmd files are not always considered executable in MSYS causing which
45362    # to not find them
45363    if test "x$new_path" = x \
45364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45366      new_path="$path"
45367
45368  windows_path="$new_path"
45369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45370    unix_path=`$CYGPATH -u "$windows_path"`
45371    new_path="$unix_path"
45372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45374    new_path="$unix_path"
45375  fi
45376
45377    fi
45378
45379    if test "x$new_path" = x; then
45380      # It's still not found. Now this is an unrecoverable error.
45381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45382$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45383      has_space=`$ECHO "$complete" | $GREP " "`
45384      if test "x$has_space" != x; then
45385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45387      fi
45388      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45389    fi
45390  fi
45391
45392  # Now new_path has a complete unix path to the binary
45393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45394    # Keep paths in /bin as-is, but remove trailing .exe if any
45395    new_path="${new_path/%.exe/}"
45396    # Do not save /bin paths to all_fixpath_prefixes!
45397  else
45398    # Not in mixed or Windows style, start by that.
45399    new_path=`cmd //c echo $new_path`
45400
45401  input_path="$new_path"
45402  # Check if we need to convert this using DOS-style short mode. If the path
45403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45404  # take no chances and rewrite it.
45405  # Note: m4 eats our [], so we need to use [ and ] instead.
45406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45407  if test "x$has_forbidden_chars" != x; then
45408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45410  fi
45411
45412    # Output is in $new_path
45413
45414  windows_path="$new_path"
45415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45416    unix_path=`$CYGPATH -u "$windows_path"`
45417    new_path="$unix_path"
45418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45420    new_path="$unix_path"
45421  fi
45422
45423    # remove trailing .exe if any
45424    new_path="${new_path/%.exe/}"
45425
45426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45428  fi
45429
45430    else
45431      # We're on a unix platform. Hooray! :)
45432      # First separate the path from the arguments. This will split at the first
45433      # space.
45434      complete="$BUILD_CC"
45435      path="${complete%% *}"
45436      tmp="$complete EOL"
45437      arguments="${tmp#* }"
45438
45439      # Cannot rely on the command "which" here since it doesn't always work.
45440      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45441      if test -z "$is_absolute_path"; then
45442        # Path to executable is not absolute. Find it.
45443        IFS_save="$IFS"
45444        IFS=:
45445        for p in $PATH; do
45446          if test -f "$p/$path" && test -x "$p/$path"; then
45447            new_path="$p/$path"
45448            break
45449          fi
45450        done
45451        IFS="$IFS_save"
45452      else
45453        # This is an absolute path, we can use it without further modifications.
45454        new_path="$path"
45455      fi
45456
45457      if test "x$new_path" = x; then
45458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45459$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45460        has_space=`$ECHO "$complete" | $GREP " "`
45461        if test "x$has_space" != x; then
45462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45464        fi
45465        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45466      fi
45467    fi
45468
45469    # Now join together the path and the arguments once again
45470    if test "x$arguments" != xEOL; then
45471      new_complete="$new_path ${arguments% *}"
45472    else
45473      new_complete="$new_path"
45474    fi
45475
45476    if test "x$complete" != "x$new_complete"; then
45477      BUILD_CC="$new_complete"
45478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45479$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45480    fi
45481  fi
45482
45483
45484
45485
45486  # Publish this variable in the help.
45487
45488
45489  if [ -z "${BUILD_CXX+x}" ]; then
45490    # The variable is not set by user, try to locate tool using the code snippet
45491    for ac_prog in cl CC g++
45492do
45493  # Extract the first word of "$ac_prog", so it can be a program name with args.
45494set dummy $ac_prog; ac_word=$2
45495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45496$as_echo_n "checking for $ac_word... " >&6; }
45497if ${ac_cv_path_BUILD_CXX+:} false; then :
45498  $as_echo_n "(cached) " >&6
45499else
45500  case $BUILD_CXX in
45501  [\\/]* | ?:[\\/]*)
45502  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45503  ;;
45504  *)
45505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45506for as_dir in $PATH
45507do
45508  IFS=$as_save_IFS
45509  test -z "$as_dir" && as_dir=.
45510    for ac_exec_ext in '' $ac_executable_extensions; do
45511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45512    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45514    break 2
45515  fi
45516done
45517  done
45518IFS=$as_save_IFS
45519
45520  ;;
45521esac
45522fi
45523BUILD_CXX=$ac_cv_path_BUILD_CXX
45524if test -n "$BUILD_CXX"; then
45525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45526$as_echo "$BUILD_CXX" >&6; }
45527else
45528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45529$as_echo "no" >&6; }
45530fi
45531
45532
45533  test -n "$BUILD_CXX" && break
45534done
45535
45536  else
45537    # The variable is set, but is it from the command line or the environment?
45538
45539    # Try to remove the string !BUILD_CXX! from our list.
45540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45542      # If it failed, the variable was not from the command line. Ignore it,
45543      # but warn the user (except for BASH, which is always set by the calling BASH).
45544      if test "xBUILD_CXX" != xBASH; then
45545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45546$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45547      fi
45548      # Try to locate tool using the code snippet
45549      for ac_prog in cl CC g++
45550do
45551  # Extract the first word of "$ac_prog", so it can be a program name with args.
45552set dummy $ac_prog; ac_word=$2
45553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45554$as_echo_n "checking for $ac_word... " >&6; }
45555if ${ac_cv_path_BUILD_CXX+:} false; then :
45556  $as_echo_n "(cached) " >&6
45557else
45558  case $BUILD_CXX in
45559  [\\/]* | ?:[\\/]*)
45560  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45561  ;;
45562  *)
45563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45564for as_dir in $PATH
45565do
45566  IFS=$as_save_IFS
45567  test -z "$as_dir" && as_dir=.
45568    for ac_exec_ext in '' $ac_executable_extensions; do
45569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45570    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45572    break 2
45573  fi
45574done
45575  done
45576IFS=$as_save_IFS
45577
45578  ;;
45579esac
45580fi
45581BUILD_CXX=$ac_cv_path_BUILD_CXX
45582if test -n "$BUILD_CXX"; then
45583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45584$as_echo "$BUILD_CXX" >&6; }
45585else
45586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45587$as_echo "no" >&6; }
45588fi
45589
45590
45591  test -n "$BUILD_CXX" && break
45592done
45593
45594    else
45595      # If it succeeded, then it was overridden by the user. We will use it
45596      # for the tool.
45597
45598      # First remove it from the list of overridden variables, so we can test
45599      # for unknown variables in the end.
45600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45601
45602      # Check if we try to supply an empty value
45603      if test "x$BUILD_CXX" = x; then
45604        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45605$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45607$as_echo_n "checking for BUILD_CXX... " >&6; }
45608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45609$as_echo "disabled" >&6; }
45610      else
45611        # Check if the provided tool contains a complete path.
45612        tool_specified="$BUILD_CXX"
45613        tool_basename="${tool_specified##*/}"
45614        if test "x$tool_basename" = "x$tool_specified"; then
45615          # A command without a complete path is provided, search $PATH.
45616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45617$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45618          # Extract the first word of "$tool_basename", so it can be a program name with args.
45619set dummy $tool_basename; ac_word=$2
45620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45621$as_echo_n "checking for $ac_word... " >&6; }
45622if ${ac_cv_path_BUILD_CXX+:} false; then :
45623  $as_echo_n "(cached) " >&6
45624else
45625  case $BUILD_CXX in
45626  [\\/]* | ?:[\\/]*)
45627  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45628  ;;
45629  *)
45630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45631for as_dir in $PATH
45632do
45633  IFS=$as_save_IFS
45634  test -z "$as_dir" && as_dir=.
45635    for ac_exec_ext in '' $ac_executable_extensions; do
45636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45637    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45639    break 2
45640  fi
45641done
45642  done
45643IFS=$as_save_IFS
45644
45645  ;;
45646esac
45647fi
45648BUILD_CXX=$ac_cv_path_BUILD_CXX
45649if test -n "$BUILD_CXX"; then
45650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45651$as_echo "$BUILD_CXX" >&6; }
45652else
45653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45654$as_echo "no" >&6; }
45655fi
45656
45657
45658          if test "x$BUILD_CXX" = x; then
45659            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45660          fi
45661        else
45662          # Otherwise we believe it is a complete path. Use it as it is.
45663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45664$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45665          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45666$as_echo_n "checking for BUILD_CXX... " >&6; }
45667          if test ! -x "$tool_specified"; then
45668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45669$as_echo "not found" >&6; }
45670            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45671          fi
45672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45673$as_echo "$tool_specified" >&6; }
45674        fi
45675      fi
45676    fi
45677
45678  fi
45679
45680
45681
45682  if test "x$BUILD_CXX" = x; then
45683    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45684  fi
45685
45686
45687
45688  # Only process if variable expands to non-empty
45689
45690  if test "x$BUILD_CXX" != x; then
45691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45692
45693  # First separate the path from the arguments. This will split at the first
45694  # space.
45695  complete="$BUILD_CXX"
45696  path="${complete%% *}"
45697  tmp="$complete EOL"
45698  arguments="${tmp#* }"
45699
45700  # Input might be given as Windows format, start by converting to
45701  # unix format.
45702  new_path=`$CYGPATH -u "$path"`
45703
45704  # Now try to locate executable using which
45705  new_path=`$WHICH "$new_path" 2> /dev/null`
45706  # bat and cmd files are not always considered executable in cygwin causing which
45707  # to not find them
45708  if test "x$new_path" = x \
45709      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45710      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45711    new_path=`$CYGPATH -u "$path"`
45712  fi
45713  if test "x$new_path" = x; then
45714    # Oops. Which didn't find the executable.
45715    # The splitting of arguments from the executable at a space might have been incorrect,
45716    # since paths with space are more likely in Windows. Give it another try with the whole
45717    # argument.
45718    path="$complete"
45719    arguments="EOL"
45720    new_path=`$CYGPATH -u "$path"`
45721    new_path=`$WHICH "$new_path" 2> /dev/null`
45722    # bat and cmd files are not always considered executable in cygwin causing which
45723    # to not find them
45724    if test "x$new_path" = x \
45725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45727      new_path=`$CYGPATH -u "$path"`
45728    fi
45729    if test "x$new_path" = x; then
45730      # It's still not found. Now this is an unrecoverable error.
45731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45732$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45733      has_space=`$ECHO "$complete" | $GREP " "`
45734      if test "x$has_space" != x; then
45735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45737      fi
45738      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45739    fi
45740  fi
45741
45742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45745  # "foo.exe" is OK but "foo" is an error.
45746  #
45747  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45748  # It is also a way to make sure we got the proper file name for the real test later on.
45749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45750  if test "x$test_shortpath" = x; then
45751    # Short path failed, file does not exist as specified.
45752    # Try adding .exe or .cmd
45753    if test -f "${new_path}.exe"; then
45754      input_to_shortpath="${new_path}.exe"
45755    elif test -f "${new_path}.cmd"; then
45756      input_to_shortpath="${new_path}.cmd"
45757    else
45758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45759$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45762      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45763    fi
45764  else
45765    input_to_shortpath="$new_path"
45766  fi
45767
45768  # Call helper function which possibly converts this using DOS-style short mode.
45769  # If so, the updated path is stored in $new_path.
45770  new_path="$input_to_shortpath"
45771
45772  input_path="$input_to_shortpath"
45773  # Check if we need to convert this using DOS-style short mode. If the path
45774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45775  # take no chances and rewrite it.
45776  # Note: m4 eats our [], so we need to use [ and ] instead.
45777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45778  if test "x$has_forbidden_chars" != x; then
45779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45783      # Going to short mode and back again did indeed matter. Since short mode is
45784      # case insensitive, let's make it lowercase to improve readability.
45785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45786      # Now convert it back to Unix-style (cygpath)
45787      input_path=`$CYGPATH -u "$shortmode_path"`
45788      new_path="$input_path"
45789    fi
45790  fi
45791
45792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45793  if test "x$test_cygdrive_prefix" = x; then
45794    # As a simple fix, exclude /usr/bin since it's not a real path.
45795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45797      # a path prefixed by /cygdrive for fixpath to work.
45798      new_path="$CYGWIN_ROOT_PATH$input_path"
45799    fi
45800  fi
45801
45802  # remove trailing .exe if any
45803  new_path="${new_path/%.exe/}"
45804
45805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45806
45807  # First separate the path from the arguments. This will split at the first
45808  # space.
45809  complete="$BUILD_CXX"
45810  path="${complete%% *}"
45811  tmp="$complete EOL"
45812  arguments="${tmp#* }"
45813
45814  # Input might be given as Windows format, start by converting to
45815  # unix format.
45816  new_path="$path"
45817
45818  windows_path="$new_path"
45819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45820    unix_path=`$CYGPATH -u "$windows_path"`
45821    new_path="$unix_path"
45822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45824    new_path="$unix_path"
45825  fi
45826
45827
45828  # Now try to locate executable using which
45829  new_path=`$WHICH "$new_path" 2> /dev/null`
45830
45831  if test "x$new_path" = x; then
45832    # Oops. Which didn't find the executable.
45833    # The splitting of arguments from the executable at a space might have been incorrect,
45834    # since paths with space are more likely in Windows. Give it another try with the whole
45835    # argument.
45836    path="$complete"
45837    arguments="EOL"
45838    new_path="$path"
45839
45840  windows_path="$new_path"
45841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45842    unix_path=`$CYGPATH -u "$windows_path"`
45843    new_path="$unix_path"
45844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45846    new_path="$unix_path"
45847  fi
45848
45849
45850    new_path=`$WHICH "$new_path" 2> /dev/null`
45851    # bat and cmd files are not always considered executable in MSYS causing which
45852    # to not find them
45853    if test "x$new_path" = x \
45854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45856      new_path="$path"
45857
45858  windows_path="$new_path"
45859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45860    unix_path=`$CYGPATH -u "$windows_path"`
45861    new_path="$unix_path"
45862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45864    new_path="$unix_path"
45865  fi
45866
45867    fi
45868
45869    if test "x$new_path" = x; then
45870      # It's still not found. Now this is an unrecoverable error.
45871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45872$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45873      has_space=`$ECHO "$complete" | $GREP " "`
45874      if test "x$has_space" != x; then
45875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45877      fi
45878      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45879    fi
45880  fi
45881
45882  # Now new_path has a complete unix path to the binary
45883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45884    # Keep paths in /bin as-is, but remove trailing .exe if any
45885    new_path="${new_path/%.exe/}"
45886    # Do not save /bin paths to all_fixpath_prefixes!
45887  else
45888    # Not in mixed or Windows style, start by that.
45889    new_path=`cmd //c echo $new_path`
45890
45891  input_path="$new_path"
45892  # Check if we need to convert this using DOS-style short mode. If the path
45893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45894  # take no chances and rewrite it.
45895  # Note: m4 eats our [], so we need to use [ and ] instead.
45896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45897  if test "x$has_forbidden_chars" != x; then
45898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45900  fi
45901
45902    # Output is in $new_path
45903
45904  windows_path="$new_path"
45905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45906    unix_path=`$CYGPATH -u "$windows_path"`
45907    new_path="$unix_path"
45908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45910    new_path="$unix_path"
45911  fi
45912
45913    # remove trailing .exe if any
45914    new_path="${new_path/%.exe/}"
45915
45916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45918  fi
45919
45920    else
45921      # We're on a unix platform. Hooray! :)
45922      # First separate the path from the arguments. This will split at the first
45923      # space.
45924      complete="$BUILD_CXX"
45925      path="${complete%% *}"
45926      tmp="$complete EOL"
45927      arguments="${tmp#* }"
45928
45929      # Cannot rely on the command "which" here since it doesn't always work.
45930      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45931      if test -z "$is_absolute_path"; then
45932        # Path to executable is not absolute. Find it.
45933        IFS_save="$IFS"
45934        IFS=:
45935        for p in $PATH; do
45936          if test -f "$p/$path" && test -x "$p/$path"; then
45937            new_path="$p/$path"
45938            break
45939          fi
45940        done
45941        IFS="$IFS_save"
45942      else
45943        # This is an absolute path, we can use it without further modifications.
45944        new_path="$path"
45945      fi
45946
45947      if test "x$new_path" = x; then
45948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45949$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45950        has_space=`$ECHO "$complete" | $GREP " "`
45951        if test "x$has_space" != x; then
45952          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45953$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45954        fi
45955        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45956      fi
45957    fi
45958
45959    # Now join together the path and the arguments once again
45960    if test "x$arguments" != xEOL; then
45961      new_complete="$new_path ${arguments% *}"
45962    else
45963      new_complete="$new_path"
45964    fi
45965
45966    if test "x$complete" != "x$new_complete"; then
45967      BUILD_CXX="$new_complete"
45968      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45969$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45970    fi
45971  fi
45972
45973
45974
45975  # Publish this variable in the help.
45976
45977
45978  if [ -z "${BUILD_NM+x}" ]; then
45979    # The variable is not set by user, try to locate tool using the code snippet
45980    for ac_prog in nm gcc-nm
45981do
45982  # Extract the first word of "$ac_prog", so it can be a program name with args.
45983set dummy $ac_prog; ac_word=$2
45984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45985$as_echo_n "checking for $ac_word... " >&6; }
45986if ${ac_cv_path_BUILD_NM+:} false; then :
45987  $as_echo_n "(cached) " >&6
45988else
45989  case $BUILD_NM in
45990  [\\/]* | ?:[\\/]*)
45991  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45992  ;;
45993  *)
45994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45995for as_dir in $PATH
45996do
45997  IFS=$as_save_IFS
45998  test -z "$as_dir" && as_dir=.
45999    for ac_exec_ext in '' $ac_executable_extensions; do
46000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46001    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46003    break 2
46004  fi
46005done
46006  done
46007IFS=$as_save_IFS
46008
46009  ;;
46010esac
46011fi
46012BUILD_NM=$ac_cv_path_BUILD_NM
46013if test -n "$BUILD_NM"; then
46014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46015$as_echo "$BUILD_NM" >&6; }
46016else
46017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46018$as_echo "no" >&6; }
46019fi
46020
46021
46022  test -n "$BUILD_NM" && break
46023done
46024
46025  else
46026    # The variable is set, but is it from the command line or the environment?
46027
46028    # Try to remove the string !BUILD_NM! from our list.
46029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46031      # If it failed, the variable was not from the command line. Ignore it,
46032      # but warn the user (except for BASH, which is always set by the calling BASH).
46033      if test "xBUILD_NM" != xBASH; then
46034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46035$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46036      fi
46037      # Try to locate tool using the code snippet
46038      for ac_prog in nm gcc-nm
46039do
46040  # Extract the first word of "$ac_prog", so it can be a program name with args.
46041set dummy $ac_prog; ac_word=$2
46042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46043$as_echo_n "checking for $ac_word... " >&6; }
46044if ${ac_cv_path_BUILD_NM+:} false; then :
46045  $as_echo_n "(cached) " >&6
46046else
46047  case $BUILD_NM in
46048  [\\/]* | ?:[\\/]*)
46049  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46050  ;;
46051  *)
46052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46053for as_dir in $PATH
46054do
46055  IFS=$as_save_IFS
46056  test -z "$as_dir" && as_dir=.
46057    for ac_exec_ext in '' $ac_executable_extensions; do
46058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46059    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46061    break 2
46062  fi
46063done
46064  done
46065IFS=$as_save_IFS
46066
46067  ;;
46068esac
46069fi
46070BUILD_NM=$ac_cv_path_BUILD_NM
46071if test -n "$BUILD_NM"; then
46072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46073$as_echo "$BUILD_NM" >&6; }
46074else
46075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46076$as_echo "no" >&6; }
46077fi
46078
46079
46080  test -n "$BUILD_NM" && break
46081done
46082
46083    else
46084      # If it succeeded, then it was overridden by the user. We will use it
46085      # for the tool.
46086
46087      # First remove it from the list of overridden variables, so we can test
46088      # for unknown variables in the end.
46089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46090
46091      # Check if we try to supply an empty value
46092      if test "x$BUILD_NM" = x; then
46093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46094$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46096$as_echo_n "checking for BUILD_NM... " >&6; }
46097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46098$as_echo "disabled" >&6; }
46099      else
46100        # Check if the provided tool contains a complete path.
46101        tool_specified="$BUILD_NM"
46102        tool_basename="${tool_specified##*/}"
46103        if test "x$tool_basename" = "x$tool_specified"; then
46104          # A command without a complete path is provided, search $PATH.
46105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46106$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46107          # Extract the first word of "$tool_basename", so it can be a program name with args.
46108set dummy $tool_basename; ac_word=$2
46109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46110$as_echo_n "checking for $ac_word... " >&6; }
46111if ${ac_cv_path_BUILD_NM+:} false; then :
46112  $as_echo_n "(cached) " >&6
46113else
46114  case $BUILD_NM in
46115  [\\/]* | ?:[\\/]*)
46116  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46117  ;;
46118  *)
46119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46120for as_dir in $PATH
46121do
46122  IFS=$as_save_IFS
46123  test -z "$as_dir" && as_dir=.
46124    for ac_exec_ext in '' $ac_executable_extensions; do
46125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46126    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46128    break 2
46129  fi
46130done
46131  done
46132IFS=$as_save_IFS
46133
46134  ;;
46135esac
46136fi
46137BUILD_NM=$ac_cv_path_BUILD_NM
46138if test -n "$BUILD_NM"; then
46139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46140$as_echo "$BUILD_NM" >&6; }
46141else
46142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46143$as_echo "no" >&6; }
46144fi
46145
46146
46147          if test "x$BUILD_NM" = x; then
46148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46149          fi
46150        else
46151          # Otherwise we believe it is a complete path. Use it as it is.
46152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46153$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46155$as_echo_n "checking for BUILD_NM... " >&6; }
46156          if test ! -x "$tool_specified"; then
46157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46158$as_echo "not found" >&6; }
46159            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46160          fi
46161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46162$as_echo "$tool_specified" >&6; }
46163        fi
46164      fi
46165    fi
46166
46167  fi
46168
46169
46170
46171  # Only process if variable expands to non-empty
46172
46173  if test "x$BUILD_NM" != x; then
46174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46175
46176  # First separate the path from the arguments. This will split at the first
46177  # space.
46178  complete="$BUILD_NM"
46179  path="${complete%% *}"
46180  tmp="$complete EOL"
46181  arguments="${tmp#* }"
46182
46183  # Input might be given as Windows format, start by converting to
46184  # unix format.
46185  new_path=`$CYGPATH -u "$path"`
46186
46187  # Now try to locate executable using which
46188  new_path=`$WHICH "$new_path" 2> /dev/null`
46189  # bat and cmd files are not always considered executable in cygwin causing which
46190  # to not find them
46191  if test "x$new_path" = x \
46192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46194    new_path=`$CYGPATH -u "$path"`
46195  fi
46196  if test "x$new_path" = x; then
46197    # Oops. Which didn't find the executable.
46198    # The splitting of arguments from the executable at a space might have been incorrect,
46199    # since paths with space are more likely in Windows. Give it another try with the whole
46200    # argument.
46201    path="$complete"
46202    arguments="EOL"
46203    new_path=`$CYGPATH -u "$path"`
46204    new_path=`$WHICH "$new_path" 2> /dev/null`
46205    # bat and cmd files are not always considered executable in cygwin causing which
46206    # to not find them
46207    if test "x$new_path" = x \
46208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46210      new_path=`$CYGPATH -u "$path"`
46211    fi
46212    if test "x$new_path" = x; then
46213      # It's still not found. Now this is an unrecoverable error.
46214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46215$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46216      has_space=`$ECHO "$complete" | $GREP " "`
46217      if test "x$has_space" != x; then
46218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46220      fi
46221      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46222    fi
46223  fi
46224
46225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46228  # "foo.exe" is OK but "foo" is an error.
46229  #
46230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46231  # It is also a way to make sure we got the proper file name for the real test later on.
46232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46233  if test "x$test_shortpath" = x; then
46234    # Short path failed, file does not exist as specified.
46235    # Try adding .exe or .cmd
46236    if test -f "${new_path}.exe"; then
46237      input_to_shortpath="${new_path}.exe"
46238    elif test -f "${new_path}.cmd"; then
46239      input_to_shortpath="${new_path}.cmd"
46240    else
46241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46242$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46245      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46246    fi
46247  else
46248    input_to_shortpath="$new_path"
46249  fi
46250
46251  # Call helper function which possibly converts this using DOS-style short mode.
46252  # If so, the updated path is stored in $new_path.
46253  new_path="$input_to_shortpath"
46254
46255  input_path="$input_to_shortpath"
46256  # Check if we need to convert this using DOS-style short mode. If the path
46257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46258  # take no chances and rewrite it.
46259  # Note: m4 eats our [], so we need to use [ and ] instead.
46260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46261  if test "x$has_forbidden_chars" != x; then
46262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46266      # Going to short mode and back again did indeed matter. Since short mode is
46267      # case insensitive, let's make it lowercase to improve readability.
46268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46269      # Now convert it back to Unix-style (cygpath)
46270      input_path=`$CYGPATH -u "$shortmode_path"`
46271      new_path="$input_path"
46272    fi
46273  fi
46274
46275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46276  if test "x$test_cygdrive_prefix" = x; then
46277    # As a simple fix, exclude /usr/bin since it's not a real path.
46278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46280      # a path prefixed by /cygdrive for fixpath to work.
46281      new_path="$CYGWIN_ROOT_PATH$input_path"
46282    fi
46283  fi
46284
46285  # remove trailing .exe if any
46286  new_path="${new_path/%.exe/}"
46287
46288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46289
46290  # First separate the path from the arguments. This will split at the first
46291  # space.
46292  complete="$BUILD_NM"
46293  path="${complete%% *}"
46294  tmp="$complete EOL"
46295  arguments="${tmp#* }"
46296
46297  # Input might be given as Windows format, start by converting to
46298  # unix format.
46299  new_path="$path"
46300
46301  windows_path="$new_path"
46302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46303    unix_path=`$CYGPATH -u "$windows_path"`
46304    new_path="$unix_path"
46305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46307    new_path="$unix_path"
46308  fi
46309
46310
46311  # Now try to locate executable using which
46312  new_path=`$WHICH "$new_path" 2> /dev/null`
46313
46314  if test "x$new_path" = x; then
46315    # Oops. Which didn't find the executable.
46316    # The splitting of arguments from the executable at a space might have been incorrect,
46317    # since paths with space are more likely in Windows. Give it another try with the whole
46318    # argument.
46319    path="$complete"
46320    arguments="EOL"
46321    new_path="$path"
46322
46323  windows_path="$new_path"
46324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46325    unix_path=`$CYGPATH -u "$windows_path"`
46326    new_path="$unix_path"
46327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46329    new_path="$unix_path"
46330  fi
46331
46332
46333    new_path=`$WHICH "$new_path" 2> /dev/null`
46334    # bat and cmd files are not always considered executable in MSYS causing which
46335    # to not find them
46336    if test "x$new_path" = x \
46337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46339      new_path="$path"
46340
46341  windows_path="$new_path"
46342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46343    unix_path=`$CYGPATH -u "$windows_path"`
46344    new_path="$unix_path"
46345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46347    new_path="$unix_path"
46348  fi
46349
46350    fi
46351
46352    if test "x$new_path" = x; then
46353      # It's still not found. Now this is an unrecoverable error.
46354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46355$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46356      has_space=`$ECHO "$complete" | $GREP " "`
46357      if test "x$has_space" != x; then
46358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46360      fi
46361      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46362    fi
46363  fi
46364
46365  # Now new_path has a complete unix path to the binary
46366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46367    # Keep paths in /bin as-is, but remove trailing .exe if any
46368    new_path="${new_path/%.exe/}"
46369    # Do not save /bin paths to all_fixpath_prefixes!
46370  else
46371    # Not in mixed or Windows style, start by that.
46372    new_path=`cmd //c echo $new_path`
46373
46374  input_path="$new_path"
46375  # Check if we need to convert this using DOS-style short mode. If the path
46376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46377  # take no chances and rewrite it.
46378  # Note: m4 eats our [], so we need to use [ and ] instead.
46379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46380  if test "x$has_forbidden_chars" != x; then
46381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46383  fi
46384
46385    # Output is in $new_path
46386
46387  windows_path="$new_path"
46388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46389    unix_path=`$CYGPATH -u "$windows_path"`
46390    new_path="$unix_path"
46391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46393    new_path="$unix_path"
46394  fi
46395
46396    # remove trailing .exe if any
46397    new_path="${new_path/%.exe/}"
46398
46399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46401  fi
46402
46403    else
46404      # We're on a unix platform. Hooray! :)
46405      # First separate the path from the arguments. This will split at the first
46406      # space.
46407      complete="$BUILD_NM"
46408      path="${complete%% *}"
46409      tmp="$complete EOL"
46410      arguments="${tmp#* }"
46411
46412      # Cannot rely on the command "which" here since it doesn't always work.
46413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46414      if test -z "$is_absolute_path"; then
46415        # Path to executable is not absolute. Find it.
46416        IFS_save="$IFS"
46417        IFS=:
46418        for p in $PATH; do
46419          if test -f "$p/$path" && test -x "$p/$path"; then
46420            new_path="$p/$path"
46421            break
46422          fi
46423        done
46424        IFS="$IFS_save"
46425      else
46426        # This is an absolute path, we can use it without further modifications.
46427        new_path="$path"
46428      fi
46429
46430      if test "x$new_path" = x; then
46431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46432$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46433        has_space=`$ECHO "$complete" | $GREP " "`
46434        if test "x$has_space" != x; then
46435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46437        fi
46438        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46439      fi
46440    fi
46441
46442    # Now join together the path and the arguments once again
46443    if test "x$arguments" != xEOL; then
46444      new_complete="$new_path ${arguments% *}"
46445    else
46446      new_complete="$new_path"
46447    fi
46448
46449    if test "x$complete" != "x$new_complete"; then
46450      BUILD_NM="$new_complete"
46451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46452$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46453    fi
46454  fi
46455
46456
46457
46458  # Publish this variable in the help.
46459
46460
46461  if [ -z "${BUILD_AR+x}" ]; then
46462    # The variable is not set by user, try to locate tool using the code snippet
46463    for ac_prog in ar gcc-ar
46464do
46465  # Extract the first word of "$ac_prog", so it can be a program name with args.
46466set dummy $ac_prog; ac_word=$2
46467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46468$as_echo_n "checking for $ac_word... " >&6; }
46469if ${ac_cv_path_BUILD_AR+:} false; then :
46470  $as_echo_n "(cached) " >&6
46471else
46472  case $BUILD_AR in
46473  [\\/]* | ?:[\\/]*)
46474  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46475  ;;
46476  *)
46477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46478for as_dir in $PATH
46479do
46480  IFS=$as_save_IFS
46481  test -z "$as_dir" && as_dir=.
46482    for ac_exec_ext in '' $ac_executable_extensions; do
46483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46484    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46486    break 2
46487  fi
46488done
46489  done
46490IFS=$as_save_IFS
46491
46492  ;;
46493esac
46494fi
46495BUILD_AR=$ac_cv_path_BUILD_AR
46496if test -n "$BUILD_AR"; then
46497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46498$as_echo "$BUILD_AR" >&6; }
46499else
46500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46501$as_echo "no" >&6; }
46502fi
46503
46504
46505  test -n "$BUILD_AR" && break
46506done
46507
46508  else
46509    # The variable is set, but is it from the command line or the environment?
46510
46511    # Try to remove the string !BUILD_AR! from our list.
46512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46514      # If it failed, the variable was not from the command line. Ignore it,
46515      # but warn the user (except for BASH, which is always set by the calling BASH).
46516      if test "xBUILD_AR" != xBASH; then
46517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46518$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46519      fi
46520      # Try to locate tool using the code snippet
46521      for ac_prog in ar gcc-ar
46522do
46523  # Extract the first word of "$ac_prog", so it can be a program name with args.
46524set dummy $ac_prog; ac_word=$2
46525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46526$as_echo_n "checking for $ac_word... " >&6; }
46527if ${ac_cv_path_BUILD_AR+:} false; then :
46528  $as_echo_n "(cached) " >&6
46529else
46530  case $BUILD_AR in
46531  [\\/]* | ?:[\\/]*)
46532  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46533  ;;
46534  *)
46535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46536for as_dir in $PATH
46537do
46538  IFS=$as_save_IFS
46539  test -z "$as_dir" && as_dir=.
46540    for ac_exec_ext in '' $ac_executable_extensions; do
46541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46542    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46544    break 2
46545  fi
46546done
46547  done
46548IFS=$as_save_IFS
46549
46550  ;;
46551esac
46552fi
46553BUILD_AR=$ac_cv_path_BUILD_AR
46554if test -n "$BUILD_AR"; then
46555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46556$as_echo "$BUILD_AR" >&6; }
46557else
46558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46559$as_echo "no" >&6; }
46560fi
46561
46562
46563  test -n "$BUILD_AR" && break
46564done
46565
46566    else
46567      # If it succeeded, then it was overridden by the user. We will use it
46568      # for the tool.
46569
46570      # First remove it from the list of overridden variables, so we can test
46571      # for unknown variables in the end.
46572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46573
46574      # Check if we try to supply an empty value
46575      if test "x$BUILD_AR" = x; then
46576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46577$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46579$as_echo_n "checking for BUILD_AR... " >&6; }
46580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46581$as_echo "disabled" >&6; }
46582      else
46583        # Check if the provided tool contains a complete path.
46584        tool_specified="$BUILD_AR"
46585        tool_basename="${tool_specified##*/}"
46586        if test "x$tool_basename" = "x$tool_specified"; then
46587          # A command without a complete path is provided, search $PATH.
46588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46589$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46590          # Extract the first word of "$tool_basename", so it can be a program name with args.
46591set dummy $tool_basename; ac_word=$2
46592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46593$as_echo_n "checking for $ac_word... " >&6; }
46594if ${ac_cv_path_BUILD_AR+:} false; then :
46595  $as_echo_n "(cached) " >&6
46596else
46597  case $BUILD_AR in
46598  [\\/]* | ?:[\\/]*)
46599  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46600  ;;
46601  *)
46602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46603for as_dir in $PATH
46604do
46605  IFS=$as_save_IFS
46606  test -z "$as_dir" && as_dir=.
46607    for ac_exec_ext in '' $ac_executable_extensions; do
46608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46609    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46611    break 2
46612  fi
46613done
46614  done
46615IFS=$as_save_IFS
46616
46617  ;;
46618esac
46619fi
46620BUILD_AR=$ac_cv_path_BUILD_AR
46621if test -n "$BUILD_AR"; then
46622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46623$as_echo "$BUILD_AR" >&6; }
46624else
46625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46626$as_echo "no" >&6; }
46627fi
46628
46629
46630          if test "x$BUILD_AR" = x; then
46631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46632          fi
46633        else
46634          # Otherwise we believe it is a complete path. Use it as it is.
46635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46636$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46638$as_echo_n "checking for BUILD_AR... " >&6; }
46639          if test ! -x "$tool_specified"; then
46640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46641$as_echo "not found" >&6; }
46642            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46643          fi
46644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46645$as_echo "$tool_specified" >&6; }
46646        fi
46647      fi
46648    fi
46649
46650  fi
46651
46652
46653
46654  # Only process if variable expands to non-empty
46655
46656  if test "x$BUILD_AR" != x; then
46657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46658
46659  # First separate the path from the arguments. This will split at the first
46660  # space.
46661  complete="$BUILD_AR"
46662  path="${complete%% *}"
46663  tmp="$complete EOL"
46664  arguments="${tmp#* }"
46665
46666  # Input might be given as Windows format, start by converting to
46667  # unix format.
46668  new_path=`$CYGPATH -u "$path"`
46669
46670  # Now try to locate executable using which
46671  new_path=`$WHICH "$new_path" 2> /dev/null`
46672  # bat and cmd files are not always considered executable in cygwin causing which
46673  # to not find them
46674  if test "x$new_path" = x \
46675      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46676      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46677    new_path=`$CYGPATH -u "$path"`
46678  fi
46679  if test "x$new_path" = x; then
46680    # Oops. Which didn't find the executable.
46681    # The splitting of arguments from the executable at a space might have been incorrect,
46682    # since paths with space are more likely in Windows. Give it another try with the whole
46683    # argument.
46684    path="$complete"
46685    arguments="EOL"
46686    new_path=`$CYGPATH -u "$path"`
46687    new_path=`$WHICH "$new_path" 2> /dev/null`
46688    # bat and cmd files are not always considered executable in cygwin causing which
46689    # to not find them
46690    if test "x$new_path" = x \
46691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46693      new_path=`$CYGPATH -u "$path"`
46694    fi
46695    if test "x$new_path" = x; then
46696      # It's still not found. Now this is an unrecoverable error.
46697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46698$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46699      has_space=`$ECHO "$complete" | $GREP " "`
46700      if test "x$has_space" != x; then
46701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46703      fi
46704      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46705    fi
46706  fi
46707
46708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46711  # "foo.exe" is OK but "foo" is an error.
46712  #
46713  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46714  # It is also a way to make sure we got the proper file name for the real test later on.
46715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46716  if test "x$test_shortpath" = x; then
46717    # Short path failed, file does not exist as specified.
46718    # Try adding .exe or .cmd
46719    if test -f "${new_path}.exe"; then
46720      input_to_shortpath="${new_path}.exe"
46721    elif test -f "${new_path}.cmd"; then
46722      input_to_shortpath="${new_path}.cmd"
46723    else
46724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46725$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46726      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46727$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46728      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46729    fi
46730  else
46731    input_to_shortpath="$new_path"
46732  fi
46733
46734  # Call helper function which possibly converts this using DOS-style short mode.
46735  # If so, the updated path is stored in $new_path.
46736  new_path="$input_to_shortpath"
46737
46738  input_path="$input_to_shortpath"
46739  # Check if we need to convert this using DOS-style short mode. If the path
46740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46741  # take no chances and rewrite it.
46742  # Note: m4 eats our [], so we need to use [ and ] instead.
46743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46744  if test "x$has_forbidden_chars" != x; then
46745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46749      # Going to short mode and back again did indeed matter. Since short mode is
46750      # case insensitive, let's make it lowercase to improve readability.
46751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46752      # Now convert it back to Unix-style (cygpath)
46753      input_path=`$CYGPATH -u "$shortmode_path"`
46754      new_path="$input_path"
46755    fi
46756  fi
46757
46758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46759  if test "x$test_cygdrive_prefix" = x; then
46760    # As a simple fix, exclude /usr/bin since it's not a real path.
46761    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46763      # a path prefixed by /cygdrive for fixpath to work.
46764      new_path="$CYGWIN_ROOT_PATH$input_path"
46765    fi
46766  fi
46767
46768  # remove trailing .exe if any
46769  new_path="${new_path/%.exe/}"
46770
46771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46772
46773  # First separate the path from the arguments. This will split at the first
46774  # space.
46775  complete="$BUILD_AR"
46776  path="${complete%% *}"
46777  tmp="$complete EOL"
46778  arguments="${tmp#* }"
46779
46780  # Input might be given as Windows format, start by converting to
46781  # unix format.
46782  new_path="$path"
46783
46784  windows_path="$new_path"
46785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46786    unix_path=`$CYGPATH -u "$windows_path"`
46787    new_path="$unix_path"
46788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46790    new_path="$unix_path"
46791  fi
46792
46793
46794  # Now try to locate executable using which
46795  new_path=`$WHICH "$new_path" 2> /dev/null`
46796
46797  if test "x$new_path" = x; then
46798    # Oops. Which didn't find the executable.
46799    # The splitting of arguments from the executable at a space might have been incorrect,
46800    # since paths with space are more likely in Windows. Give it another try with the whole
46801    # argument.
46802    path="$complete"
46803    arguments="EOL"
46804    new_path="$path"
46805
46806  windows_path="$new_path"
46807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46808    unix_path=`$CYGPATH -u "$windows_path"`
46809    new_path="$unix_path"
46810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46812    new_path="$unix_path"
46813  fi
46814
46815
46816    new_path=`$WHICH "$new_path" 2> /dev/null`
46817    # bat and cmd files are not always considered executable in MSYS causing which
46818    # to not find them
46819    if test "x$new_path" = x \
46820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46822      new_path="$path"
46823
46824  windows_path="$new_path"
46825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46826    unix_path=`$CYGPATH -u "$windows_path"`
46827    new_path="$unix_path"
46828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46830    new_path="$unix_path"
46831  fi
46832
46833    fi
46834
46835    if test "x$new_path" = x; then
46836      # It's still not found. Now this is an unrecoverable error.
46837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46838$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46839      has_space=`$ECHO "$complete" | $GREP " "`
46840      if test "x$has_space" != x; then
46841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46843      fi
46844      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46845    fi
46846  fi
46847
46848  # Now new_path has a complete unix path to the binary
46849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46850    # Keep paths in /bin as-is, but remove trailing .exe if any
46851    new_path="${new_path/%.exe/}"
46852    # Do not save /bin paths to all_fixpath_prefixes!
46853  else
46854    # Not in mixed or Windows style, start by that.
46855    new_path=`cmd //c echo $new_path`
46856
46857  input_path="$new_path"
46858  # Check if we need to convert this using DOS-style short mode. If the path
46859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46860  # take no chances and rewrite it.
46861  # Note: m4 eats our [], so we need to use [ and ] instead.
46862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46863  if test "x$has_forbidden_chars" != x; then
46864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46866  fi
46867
46868    # Output is in $new_path
46869
46870  windows_path="$new_path"
46871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46872    unix_path=`$CYGPATH -u "$windows_path"`
46873    new_path="$unix_path"
46874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46876    new_path="$unix_path"
46877  fi
46878
46879    # remove trailing .exe if any
46880    new_path="${new_path/%.exe/}"
46881
46882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46884  fi
46885
46886    else
46887      # We're on a unix platform. Hooray! :)
46888      # First separate the path from the arguments. This will split at the first
46889      # space.
46890      complete="$BUILD_AR"
46891      path="${complete%% *}"
46892      tmp="$complete EOL"
46893      arguments="${tmp#* }"
46894
46895      # Cannot rely on the command "which" here since it doesn't always work.
46896      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46897      if test -z "$is_absolute_path"; then
46898        # Path to executable is not absolute. Find it.
46899        IFS_save="$IFS"
46900        IFS=:
46901        for p in $PATH; do
46902          if test -f "$p/$path" && test -x "$p/$path"; then
46903            new_path="$p/$path"
46904            break
46905          fi
46906        done
46907        IFS="$IFS_save"
46908      else
46909        # This is an absolute path, we can use it without further modifications.
46910        new_path="$path"
46911      fi
46912
46913      if test "x$new_path" = x; then
46914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46915$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46916        has_space=`$ECHO "$complete" | $GREP " "`
46917        if test "x$has_space" != x; then
46918          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46919$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46920        fi
46921        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46922      fi
46923    fi
46924
46925    # Now join together the path and the arguments once again
46926    if test "x$arguments" != xEOL; then
46927      new_complete="$new_path ${arguments% *}"
46928    else
46929      new_complete="$new_path"
46930    fi
46931
46932    if test "x$complete" != "x$new_complete"; then
46933      BUILD_AR="$new_complete"
46934      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46935$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46936    fi
46937  fi
46938
46939
46940
46941  # Publish this variable in the help.
46942
46943
46944  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46945    # The variable is not set by user, try to locate tool using the code snippet
46946    for ac_prog in objcopy
46947do
46948  # Extract the first word of "$ac_prog", so it can be a program name with args.
46949set dummy $ac_prog; ac_word=$2
46950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46951$as_echo_n "checking for $ac_word... " >&6; }
46952if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46953  $as_echo_n "(cached) " >&6
46954else
46955  case $BUILD_OBJCOPY in
46956  [\\/]* | ?:[\\/]*)
46957  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46958  ;;
46959  *)
46960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46961for as_dir in $PATH
46962do
46963  IFS=$as_save_IFS
46964  test -z "$as_dir" && as_dir=.
46965    for ac_exec_ext in '' $ac_executable_extensions; do
46966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46967    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46969    break 2
46970  fi
46971done
46972  done
46973IFS=$as_save_IFS
46974
46975  ;;
46976esac
46977fi
46978BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46979if test -n "$BUILD_OBJCOPY"; then
46980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46981$as_echo "$BUILD_OBJCOPY" >&6; }
46982else
46983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46984$as_echo "no" >&6; }
46985fi
46986
46987
46988  test -n "$BUILD_OBJCOPY" && break
46989done
46990
46991  else
46992    # The variable is set, but is it from the command line or the environment?
46993
46994    # Try to remove the string !BUILD_OBJCOPY! from our list.
46995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46997      # If it failed, the variable was not from the command line. Ignore it,
46998      # but warn the user (except for BASH, which is always set by the calling BASH).
46999      if test "xBUILD_OBJCOPY" != xBASH; then
47000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47001$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47002      fi
47003      # Try to locate tool using the code snippet
47004      for ac_prog in objcopy
47005do
47006  # Extract the first word of "$ac_prog", so it can be a program name with args.
47007set dummy $ac_prog; ac_word=$2
47008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47009$as_echo_n "checking for $ac_word... " >&6; }
47010if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47011  $as_echo_n "(cached) " >&6
47012else
47013  case $BUILD_OBJCOPY in
47014  [\\/]* | ?:[\\/]*)
47015  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47016  ;;
47017  *)
47018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47019for as_dir in $PATH
47020do
47021  IFS=$as_save_IFS
47022  test -z "$as_dir" && as_dir=.
47023    for ac_exec_ext in '' $ac_executable_extensions; do
47024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47025    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47027    break 2
47028  fi
47029done
47030  done
47031IFS=$as_save_IFS
47032
47033  ;;
47034esac
47035fi
47036BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47037if test -n "$BUILD_OBJCOPY"; then
47038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47039$as_echo "$BUILD_OBJCOPY" >&6; }
47040else
47041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47042$as_echo "no" >&6; }
47043fi
47044
47045
47046  test -n "$BUILD_OBJCOPY" && break
47047done
47048
47049    else
47050      # If it succeeded, then it was overridden by the user. We will use it
47051      # for the tool.
47052
47053      # First remove it from the list of overridden variables, so we can test
47054      # for unknown variables in the end.
47055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47056
47057      # Check if we try to supply an empty value
47058      if test "x$BUILD_OBJCOPY" = x; then
47059        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47060$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47061        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47062$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47064$as_echo "disabled" >&6; }
47065      else
47066        # Check if the provided tool contains a complete path.
47067        tool_specified="$BUILD_OBJCOPY"
47068        tool_basename="${tool_specified##*/}"
47069        if test "x$tool_basename" = "x$tool_specified"; then
47070          # A command without a complete path is provided, search $PATH.
47071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47072$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47073          # Extract the first word of "$tool_basename", so it can be a program name with args.
47074set dummy $tool_basename; ac_word=$2
47075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47076$as_echo_n "checking for $ac_word... " >&6; }
47077if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47078  $as_echo_n "(cached) " >&6
47079else
47080  case $BUILD_OBJCOPY in
47081  [\\/]* | ?:[\\/]*)
47082  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47083  ;;
47084  *)
47085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47086for as_dir in $PATH
47087do
47088  IFS=$as_save_IFS
47089  test -z "$as_dir" && as_dir=.
47090    for ac_exec_ext in '' $ac_executable_extensions; do
47091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47092    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47094    break 2
47095  fi
47096done
47097  done
47098IFS=$as_save_IFS
47099
47100  ;;
47101esac
47102fi
47103BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47104if test -n "$BUILD_OBJCOPY"; then
47105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47106$as_echo "$BUILD_OBJCOPY" >&6; }
47107else
47108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47109$as_echo "no" >&6; }
47110fi
47111
47112
47113          if test "x$BUILD_OBJCOPY" = x; then
47114            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47115          fi
47116        else
47117          # Otherwise we believe it is a complete path. Use it as it is.
47118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47119$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47120          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47121$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47122          if test ! -x "$tool_specified"; then
47123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47124$as_echo "not found" >&6; }
47125            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47126          fi
47127          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47128$as_echo "$tool_specified" >&6; }
47129        fi
47130      fi
47131    fi
47132
47133  fi
47134
47135
47136
47137  # Only process if variable expands to non-empty
47138
47139  if test "x$BUILD_OBJCOPY" != x; then
47140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47141
47142  # First separate the path from the arguments. This will split at the first
47143  # space.
47144  complete="$BUILD_OBJCOPY"
47145  path="${complete%% *}"
47146  tmp="$complete EOL"
47147  arguments="${tmp#* }"
47148
47149  # Input might be given as Windows format, start by converting to
47150  # unix format.
47151  new_path=`$CYGPATH -u "$path"`
47152
47153  # Now try to locate executable using which
47154  new_path=`$WHICH "$new_path" 2> /dev/null`
47155  # bat and cmd files are not always considered executable in cygwin causing which
47156  # to not find them
47157  if test "x$new_path" = x \
47158      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47159      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47160    new_path=`$CYGPATH -u "$path"`
47161  fi
47162  if test "x$new_path" = x; then
47163    # Oops. Which didn't find the executable.
47164    # The splitting of arguments from the executable at a space might have been incorrect,
47165    # since paths with space are more likely in Windows. Give it another try with the whole
47166    # argument.
47167    path="$complete"
47168    arguments="EOL"
47169    new_path=`$CYGPATH -u "$path"`
47170    new_path=`$WHICH "$new_path" 2> /dev/null`
47171    # bat and cmd files are not always considered executable in cygwin causing which
47172    # to not find them
47173    if test "x$new_path" = x \
47174        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47175        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47176      new_path=`$CYGPATH -u "$path"`
47177    fi
47178    if test "x$new_path" = x; then
47179      # It's still not found. Now this is an unrecoverable error.
47180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47181$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47182      has_space=`$ECHO "$complete" | $GREP " "`
47183      if test "x$has_space" != x; then
47184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47186      fi
47187      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47188    fi
47189  fi
47190
47191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47194  # "foo.exe" is OK but "foo" is an error.
47195  #
47196  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47197  # It is also a way to make sure we got the proper file name for the real test later on.
47198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47199  if test "x$test_shortpath" = x; then
47200    # Short path failed, file does not exist as specified.
47201    # Try adding .exe or .cmd
47202    if test -f "${new_path}.exe"; then
47203      input_to_shortpath="${new_path}.exe"
47204    elif test -f "${new_path}.cmd"; then
47205      input_to_shortpath="${new_path}.cmd"
47206    else
47207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47208$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47209      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47210$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47211      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47212    fi
47213  else
47214    input_to_shortpath="$new_path"
47215  fi
47216
47217  # Call helper function which possibly converts this using DOS-style short mode.
47218  # If so, the updated path is stored in $new_path.
47219  new_path="$input_to_shortpath"
47220
47221  input_path="$input_to_shortpath"
47222  # Check if we need to convert this using DOS-style short mode. If the path
47223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47224  # take no chances and rewrite it.
47225  # Note: m4 eats our [], so we need to use [ and ] instead.
47226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47227  if test "x$has_forbidden_chars" != x; then
47228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47232      # Going to short mode and back again did indeed matter. Since short mode is
47233      # case insensitive, let's make it lowercase to improve readability.
47234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47235      # Now convert it back to Unix-style (cygpath)
47236      input_path=`$CYGPATH -u "$shortmode_path"`
47237      new_path="$input_path"
47238    fi
47239  fi
47240
47241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47242  if test "x$test_cygdrive_prefix" = x; then
47243    # As a simple fix, exclude /usr/bin since it's not a real path.
47244    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47246      # a path prefixed by /cygdrive for fixpath to work.
47247      new_path="$CYGWIN_ROOT_PATH$input_path"
47248    fi
47249  fi
47250
47251  # remove trailing .exe if any
47252  new_path="${new_path/%.exe/}"
47253
47254    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47255
47256  # First separate the path from the arguments. This will split at the first
47257  # space.
47258  complete="$BUILD_OBJCOPY"
47259  path="${complete%% *}"
47260  tmp="$complete EOL"
47261  arguments="${tmp#* }"
47262
47263  # Input might be given as Windows format, start by converting to
47264  # unix format.
47265  new_path="$path"
47266
47267  windows_path="$new_path"
47268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47269    unix_path=`$CYGPATH -u "$windows_path"`
47270    new_path="$unix_path"
47271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47273    new_path="$unix_path"
47274  fi
47275
47276
47277  # Now try to locate executable using which
47278  new_path=`$WHICH "$new_path" 2> /dev/null`
47279
47280  if test "x$new_path" = x; then
47281    # Oops. Which didn't find the executable.
47282    # The splitting of arguments from the executable at a space might have been incorrect,
47283    # since paths with space are more likely in Windows. Give it another try with the whole
47284    # argument.
47285    path="$complete"
47286    arguments="EOL"
47287    new_path="$path"
47288
47289  windows_path="$new_path"
47290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47291    unix_path=`$CYGPATH -u "$windows_path"`
47292    new_path="$unix_path"
47293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47295    new_path="$unix_path"
47296  fi
47297
47298
47299    new_path=`$WHICH "$new_path" 2> /dev/null`
47300    # bat and cmd files are not always considered executable in MSYS causing which
47301    # to not find them
47302    if test "x$new_path" = x \
47303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47305      new_path="$path"
47306
47307  windows_path="$new_path"
47308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47309    unix_path=`$CYGPATH -u "$windows_path"`
47310    new_path="$unix_path"
47311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47313    new_path="$unix_path"
47314  fi
47315
47316    fi
47317
47318    if test "x$new_path" = x; then
47319      # It's still not found. Now this is an unrecoverable error.
47320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47321$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47322      has_space=`$ECHO "$complete" | $GREP " "`
47323      if test "x$has_space" != x; then
47324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47326      fi
47327      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47328    fi
47329  fi
47330
47331  # Now new_path has a complete unix path to the binary
47332  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47333    # Keep paths in /bin as-is, but remove trailing .exe if any
47334    new_path="${new_path/%.exe/}"
47335    # Do not save /bin paths to all_fixpath_prefixes!
47336  else
47337    # Not in mixed or Windows style, start by that.
47338    new_path=`cmd //c echo $new_path`
47339
47340  input_path="$new_path"
47341  # Check if we need to convert this using DOS-style short mode. If the path
47342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47343  # take no chances and rewrite it.
47344  # Note: m4 eats our [], so we need to use [ and ] instead.
47345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47346  if test "x$has_forbidden_chars" != x; then
47347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47349  fi
47350
47351    # Output is in $new_path
47352
47353  windows_path="$new_path"
47354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47355    unix_path=`$CYGPATH -u "$windows_path"`
47356    new_path="$unix_path"
47357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47359    new_path="$unix_path"
47360  fi
47361
47362    # remove trailing .exe if any
47363    new_path="${new_path/%.exe/}"
47364
47365    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47366    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47367  fi
47368
47369    else
47370      # We're on a unix platform. Hooray! :)
47371      # First separate the path from the arguments. This will split at the first
47372      # space.
47373      complete="$BUILD_OBJCOPY"
47374      path="${complete%% *}"
47375      tmp="$complete EOL"
47376      arguments="${tmp#* }"
47377
47378      # Cannot rely on the command "which" here since it doesn't always work.
47379      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47380      if test -z "$is_absolute_path"; then
47381        # Path to executable is not absolute. Find it.
47382        IFS_save="$IFS"
47383        IFS=:
47384        for p in $PATH; do
47385          if test -f "$p/$path" && test -x "$p/$path"; then
47386            new_path="$p/$path"
47387            break
47388          fi
47389        done
47390        IFS="$IFS_save"
47391      else
47392        # This is an absolute path, we can use it without further modifications.
47393        new_path="$path"
47394      fi
47395
47396      if test "x$new_path" = x; then
47397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47398$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47399        has_space=`$ECHO "$complete" | $GREP " "`
47400        if test "x$has_space" != x; then
47401          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47402$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47403        fi
47404        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47405      fi
47406    fi
47407
47408    # Now join together the path and the arguments once again
47409    if test "x$arguments" != xEOL; then
47410      new_complete="$new_path ${arguments% *}"
47411    else
47412      new_complete="$new_path"
47413    fi
47414
47415    if test "x$complete" != "x$new_complete"; then
47416      BUILD_OBJCOPY="$new_complete"
47417      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47418$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47419    fi
47420  fi
47421
47422
47423
47424  # Publish this variable in the help.
47425
47426
47427  if [ -z "${BUILD_STRIP+x}" ]; then
47428    # The variable is not set by user, try to locate tool using the code snippet
47429    for ac_prog in strip
47430do
47431  # Extract the first word of "$ac_prog", so it can be a program name with args.
47432set dummy $ac_prog; ac_word=$2
47433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47434$as_echo_n "checking for $ac_word... " >&6; }
47435if ${ac_cv_path_BUILD_STRIP+:} false; then :
47436  $as_echo_n "(cached) " >&6
47437else
47438  case $BUILD_STRIP in
47439  [\\/]* | ?:[\\/]*)
47440  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47441  ;;
47442  *)
47443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47444for as_dir in $PATH
47445do
47446  IFS=$as_save_IFS
47447  test -z "$as_dir" && as_dir=.
47448    for ac_exec_ext in '' $ac_executable_extensions; do
47449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47450    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47452    break 2
47453  fi
47454done
47455  done
47456IFS=$as_save_IFS
47457
47458  ;;
47459esac
47460fi
47461BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47462if test -n "$BUILD_STRIP"; then
47463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47464$as_echo "$BUILD_STRIP" >&6; }
47465else
47466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47467$as_echo "no" >&6; }
47468fi
47469
47470
47471  test -n "$BUILD_STRIP" && break
47472done
47473
47474  else
47475    # The variable is set, but is it from the command line or the environment?
47476
47477    # Try to remove the string !BUILD_STRIP! from our list.
47478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47480      # If it failed, the variable was not from the command line. Ignore it,
47481      # but warn the user (except for BASH, which is always set by the calling BASH).
47482      if test "xBUILD_STRIP" != xBASH; then
47483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47484$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47485      fi
47486      # Try to locate tool using the code snippet
47487      for ac_prog in strip
47488do
47489  # Extract the first word of "$ac_prog", so it can be a program name with args.
47490set dummy $ac_prog; ac_word=$2
47491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47492$as_echo_n "checking for $ac_word... " >&6; }
47493if ${ac_cv_path_BUILD_STRIP+:} false; then :
47494  $as_echo_n "(cached) " >&6
47495else
47496  case $BUILD_STRIP in
47497  [\\/]* | ?:[\\/]*)
47498  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47499  ;;
47500  *)
47501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47502for as_dir in $PATH
47503do
47504  IFS=$as_save_IFS
47505  test -z "$as_dir" && as_dir=.
47506    for ac_exec_ext in '' $ac_executable_extensions; do
47507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47508    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47510    break 2
47511  fi
47512done
47513  done
47514IFS=$as_save_IFS
47515
47516  ;;
47517esac
47518fi
47519BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47520if test -n "$BUILD_STRIP"; then
47521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47522$as_echo "$BUILD_STRIP" >&6; }
47523else
47524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47525$as_echo "no" >&6; }
47526fi
47527
47528
47529  test -n "$BUILD_STRIP" && break
47530done
47531
47532    else
47533      # If it succeeded, then it was overridden by the user. We will use it
47534      # for the tool.
47535
47536      # First remove it from the list of overridden variables, so we can test
47537      # for unknown variables in the end.
47538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47539
47540      # Check if we try to supply an empty value
47541      if test "x$BUILD_STRIP" = x; then
47542        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47543$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47545$as_echo_n "checking for BUILD_STRIP... " >&6; }
47546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47547$as_echo "disabled" >&6; }
47548      else
47549        # Check if the provided tool contains a complete path.
47550        tool_specified="$BUILD_STRIP"
47551        tool_basename="${tool_specified##*/}"
47552        if test "x$tool_basename" = "x$tool_specified"; then
47553          # A command without a complete path is provided, search $PATH.
47554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47555$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47556          # Extract the first word of "$tool_basename", so it can be a program name with args.
47557set dummy $tool_basename; ac_word=$2
47558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47559$as_echo_n "checking for $ac_word... " >&6; }
47560if ${ac_cv_path_BUILD_STRIP+:} false; then :
47561  $as_echo_n "(cached) " >&6
47562else
47563  case $BUILD_STRIP in
47564  [\\/]* | ?:[\\/]*)
47565  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47566  ;;
47567  *)
47568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47569for as_dir in $PATH
47570do
47571  IFS=$as_save_IFS
47572  test -z "$as_dir" && as_dir=.
47573    for ac_exec_ext in '' $ac_executable_extensions; do
47574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47575    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47577    break 2
47578  fi
47579done
47580  done
47581IFS=$as_save_IFS
47582
47583  ;;
47584esac
47585fi
47586BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47587if test -n "$BUILD_STRIP"; then
47588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47589$as_echo "$BUILD_STRIP" >&6; }
47590else
47591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47592$as_echo "no" >&6; }
47593fi
47594
47595
47596          if test "x$BUILD_STRIP" = x; then
47597            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47598          fi
47599        else
47600          # Otherwise we believe it is a complete path. Use it as it is.
47601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47602$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47603          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47604$as_echo_n "checking for BUILD_STRIP... " >&6; }
47605          if test ! -x "$tool_specified"; then
47606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47607$as_echo "not found" >&6; }
47608            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47609          fi
47610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47611$as_echo "$tool_specified" >&6; }
47612        fi
47613      fi
47614    fi
47615
47616  fi
47617
47618
47619
47620  # Only process if variable expands to non-empty
47621
47622  if test "x$BUILD_STRIP" != x; then
47623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47624
47625  # First separate the path from the arguments. This will split at the first
47626  # space.
47627  complete="$BUILD_STRIP"
47628  path="${complete%% *}"
47629  tmp="$complete EOL"
47630  arguments="${tmp#* }"
47631
47632  # Input might be given as Windows format, start by converting to
47633  # unix format.
47634  new_path=`$CYGPATH -u "$path"`
47635
47636  # Now try to locate executable using which
47637  new_path=`$WHICH "$new_path" 2> /dev/null`
47638  # bat and cmd files are not always considered executable in cygwin causing which
47639  # to not find them
47640  if test "x$new_path" = x \
47641      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47642      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47643    new_path=`$CYGPATH -u "$path"`
47644  fi
47645  if test "x$new_path" = x; then
47646    # Oops. Which didn't find the executable.
47647    # The splitting of arguments from the executable at a space might have been incorrect,
47648    # since paths with space are more likely in Windows. Give it another try with the whole
47649    # argument.
47650    path="$complete"
47651    arguments="EOL"
47652    new_path=`$CYGPATH -u "$path"`
47653    new_path=`$WHICH "$new_path" 2> /dev/null`
47654    # bat and cmd files are not always considered executable in cygwin causing which
47655    # to not find them
47656    if test "x$new_path" = x \
47657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47659      new_path=`$CYGPATH -u "$path"`
47660    fi
47661    if test "x$new_path" = x; then
47662      # It's still not found. Now this is an unrecoverable error.
47663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47664$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47665      has_space=`$ECHO "$complete" | $GREP " "`
47666      if test "x$has_space" != x; then
47667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47669      fi
47670      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47671    fi
47672  fi
47673
47674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47677  # "foo.exe" is OK but "foo" is an error.
47678  #
47679  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47680  # It is also a way to make sure we got the proper file name for the real test later on.
47681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47682  if test "x$test_shortpath" = x; then
47683    # Short path failed, file does not exist as specified.
47684    # Try adding .exe or .cmd
47685    if test -f "${new_path}.exe"; then
47686      input_to_shortpath="${new_path}.exe"
47687    elif test -f "${new_path}.cmd"; then
47688      input_to_shortpath="${new_path}.cmd"
47689    else
47690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47691$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47694      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47695    fi
47696  else
47697    input_to_shortpath="$new_path"
47698  fi
47699
47700  # Call helper function which possibly converts this using DOS-style short mode.
47701  # If so, the updated path is stored in $new_path.
47702  new_path="$input_to_shortpath"
47703
47704  input_path="$input_to_shortpath"
47705  # Check if we need to convert this using DOS-style short mode. If the path
47706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47707  # take no chances and rewrite it.
47708  # Note: m4 eats our [], so we need to use [ and ] instead.
47709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47710  if test "x$has_forbidden_chars" != x; then
47711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47715      # Going to short mode and back again did indeed matter. Since short mode is
47716      # case insensitive, let's make it lowercase to improve readability.
47717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47718      # Now convert it back to Unix-style (cygpath)
47719      input_path=`$CYGPATH -u "$shortmode_path"`
47720      new_path="$input_path"
47721    fi
47722  fi
47723
47724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47725  if test "x$test_cygdrive_prefix" = x; then
47726    # As a simple fix, exclude /usr/bin since it's not a real path.
47727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47729      # a path prefixed by /cygdrive for fixpath to work.
47730      new_path="$CYGWIN_ROOT_PATH$input_path"
47731    fi
47732  fi
47733
47734  # remove trailing .exe if any
47735  new_path="${new_path/%.exe/}"
47736
47737    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47738
47739  # First separate the path from the arguments. This will split at the first
47740  # space.
47741  complete="$BUILD_STRIP"
47742  path="${complete%% *}"
47743  tmp="$complete EOL"
47744  arguments="${tmp#* }"
47745
47746  # Input might be given as Windows format, start by converting to
47747  # unix format.
47748  new_path="$path"
47749
47750  windows_path="$new_path"
47751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47752    unix_path=`$CYGPATH -u "$windows_path"`
47753    new_path="$unix_path"
47754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47756    new_path="$unix_path"
47757  fi
47758
47759
47760  # Now try to locate executable using which
47761  new_path=`$WHICH "$new_path" 2> /dev/null`
47762
47763  if test "x$new_path" = x; then
47764    # Oops. Which didn't find the executable.
47765    # The splitting of arguments from the executable at a space might have been incorrect,
47766    # since paths with space are more likely in Windows. Give it another try with the whole
47767    # argument.
47768    path="$complete"
47769    arguments="EOL"
47770    new_path="$path"
47771
47772  windows_path="$new_path"
47773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47774    unix_path=`$CYGPATH -u "$windows_path"`
47775    new_path="$unix_path"
47776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47778    new_path="$unix_path"
47779  fi
47780
47781
47782    new_path=`$WHICH "$new_path" 2> /dev/null`
47783    # bat and cmd files are not always considered executable in MSYS causing which
47784    # to not find them
47785    if test "x$new_path" = x \
47786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47788      new_path="$path"
47789
47790  windows_path="$new_path"
47791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47792    unix_path=`$CYGPATH -u "$windows_path"`
47793    new_path="$unix_path"
47794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47796    new_path="$unix_path"
47797  fi
47798
47799    fi
47800
47801    if test "x$new_path" = x; then
47802      # It's still not found. Now this is an unrecoverable error.
47803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47804$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47805      has_space=`$ECHO "$complete" | $GREP " "`
47806      if test "x$has_space" != x; then
47807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47809      fi
47810      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47811    fi
47812  fi
47813
47814  # Now new_path has a complete unix path to the binary
47815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47816    # Keep paths in /bin as-is, but remove trailing .exe if any
47817    new_path="${new_path/%.exe/}"
47818    # Do not save /bin paths to all_fixpath_prefixes!
47819  else
47820    # Not in mixed or Windows style, start by that.
47821    new_path=`cmd //c echo $new_path`
47822
47823  input_path="$new_path"
47824  # Check if we need to convert this using DOS-style short mode. If the path
47825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47826  # take no chances and rewrite it.
47827  # Note: m4 eats our [], so we need to use [ and ] instead.
47828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47829  if test "x$has_forbidden_chars" != x; then
47830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47832  fi
47833
47834    # Output is in $new_path
47835
47836  windows_path="$new_path"
47837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47838    unix_path=`$CYGPATH -u "$windows_path"`
47839    new_path="$unix_path"
47840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47842    new_path="$unix_path"
47843  fi
47844
47845    # remove trailing .exe if any
47846    new_path="${new_path/%.exe/}"
47847
47848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47850  fi
47851
47852    else
47853      # We're on a unix platform. Hooray! :)
47854      # First separate the path from the arguments. This will split at the first
47855      # space.
47856      complete="$BUILD_STRIP"
47857      path="${complete%% *}"
47858      tmp="$complete EOL"
47859      arguments="${tmp#* }"
47860
47861      # Cannot rely on the command "which" here since it doesn't always work.
47862      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47863      if test -z "$is_absolute_path"; then
47864        # Path to executable is not absolute. Find it.
47865        IFS_save="$IFS"
47866        IFS=:
47867        for p in $PATH; do
47868          if test -f "$p/$path" && test -x "$p/$path"; then
47869            new_path="$p/$path"
47870            break
47871          fi
47872        done
47873        IFS="$IFS_save"
47874      else
47875        # This is an absolute path, we can use it without further modifications.
47876        new_path="$path"
47877      fi
47878
47879      if test "x$new_path" = x; then
47880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47881$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47882        has_space=`$ECHO "$complete" | $GREP " "`
47883        if test "x$has_space" != x; then
47884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47886        fi
47887        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47888      fi
47889    fi
47890
47891    # Now join together the path and the arguments once again
47892    if test "x$arguments" != xEOL; then
47893      new_complete="$new_path ${arguments% *}"
47894    else
47895      new_complete="$new_path"
47896    fi
47897
47898    if test "x$complete" != "x$new_complete"; then
47899      BUILD_STRIP="$new_complete"
47900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47901$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47902    fi
47903  fi
47904
47905    # Assume the C compiler is the assembler
47906    BUILD_AS="$BUILD_CC -c"
47907    # Just like for the target compiler, use the compiler as linker
47908    BUILD_LD="$BUILD_CC"
47909    BUILD_LDCXX="$BUILD_CXX"
47910
47911    PATH="$OLDPATH"
47912
47913
47914  COMPILER=$BUILD_CC
47915  COMPILER_NAME=BuildC
47916
47917  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47918    # cc -V output typically looks like
47919    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47920    # or
47921    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47922    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47923    # Check that this is likely to be the Solaris Studio cc.
47924    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47925    if test $? -ne 0; then
47926      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47927      { $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
47928$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47929      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47930$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47931      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47932$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47933      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47934    fi
47935    # Remove usage instructions (if present), and
47936    # collapse compiler output into a single line
47937    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47938        $SED -e 's/ *[Uu]sage:.*//'`
47939    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47940        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47941  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47942    # xlc -qversion output typically looks like
47943    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47944    #     Version: 11.01.0000.0015
47945    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47946    # Check that this is likely to be the IBM XL C compiler.
47947    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47948    if test $? -ne 0; then
47949      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47950      { $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
47951$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47953$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47954      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47955$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47956      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47957    fi
47958    # Collapse compiler output into a single line
47959    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47960    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47961        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47962  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47963    # There is no specific version flag, but all output starts with a version string.
47964    # First line typically looks something like:
47965    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47966    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47967    # Check that this is likely to be Microsoft CL.EXE.
47968    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47969    if test $? -ne 0; then
47970      { $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
47971$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47973$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47975    fi
47976    # Collapse compiler output into a single line
47977    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47978    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47979        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47980  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47981    # gcc --version output typically looks like
47982    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47983    #     Copyright (C) 2013 Free Software Foundation, Inc.
47984    #     This is free software; see the source for copying conditions.  There is NO
47985    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47986    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47987    # Check that this is likely to be GCC.
47988    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47989    if test $? -ne 0; then
47990      { $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
47991$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47992      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47993$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47994      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47995    fi
47996    # Remove Copyright and legalese from version string, and
47997    # collapse into a single line
47998    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47999        $SED -e 's/ *Copyright .*//'`
48000    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48001        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48002  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48003    # clang --version output typically looks like
48004    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48005    #    clang version 3.3 (tags/RELEASE_33/final)
48006    # or
48007    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48008    #    Target: x86_64-pc-linux-gnu
48009    #    Thread model: posix
48010    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48011    # Check that this is likely to be clang
48012    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48013    if test $? -ne 0; then
48014      { $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
48015$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48016      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48017$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48018      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48019    fi
48020    # Collapse compiler output into a single line
48021    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48022    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48023        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48024  else
48025      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48026  fi
48027  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48028  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48029  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48030  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48031
48032  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48033$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48034
48035
48036  COMPILER=$BUILD_CXX
48037  COMPILER_NAME=BuildC++
48038
48039  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48040    # cc -V output typically looks like
48041    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48042    # or
48043    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48044    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48045    # Check that this is likely to be the Solaris Studio cc.
48046    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48047    if test $? -ne 0; then
48048      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48049      { $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
48050$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48051      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48052$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48053      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48054$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48055      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48056    fi
48057    # Remove usage instructions (if present), and
48058    # collapse compiler output into a single line
48059    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48060        $SED -e 's/ *[Uu]sage:.*//'`
48061    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48062        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48063  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48064    # xlc -qversion output typically looks like
48065    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48066    #     Version: 11.01.0000.0015
48067    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48068    # Check that this is likely to be the IBM XL C compiler.
48069    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48070    if test $? -ne 0; then
48071      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48072      { $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
48073$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48074      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48075$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48076      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48077$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48078      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48079    fi
48080    # Collapse compiler output into a single line
48081    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48082    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48083        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48084  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48085    # There is no specific version flag, but all output starts with a version string.
48086    # First line typically looks something like:
48087    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48088    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48089    # Check that this is likely to be Microsoft CL.EXE.
48090    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48091    if test $? -ne 0; then
48092      { $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
48093$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48095$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48096      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48097    fi
48098    # Collapse compiler output into a single line
48099    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48100    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48101        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48102  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48103    # gcc --version output typically looks like
48104    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48105    #     Copyright (C) 2013 Free Software Foundation, Inc.
48106    #     This is free software; see the source for copying conditions.  There is NO
48107    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48108    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48109    # Check that this is likely to be GCC.
48110    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48111    if test $? -ne 0; then
48112      { $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
48113$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48114      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48115$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48116      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48117    fi
48118    # Remove Copyright and legalese from version string, and
48119    # collapse into a single line
48120    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48121        $SED -e 's/ *Copyright .*//'`
48122    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48123        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48124  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48125    # clang --version output typically looks like
48126    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48127    #    clang version 3.3 (tags/RELEASE_33/final)
48128    # or
48129    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48130    #    Target: x86_64-pc-linux-gnu
48131    #    Thread model: posix
48132    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48133    # Check that this is likely to be clang
48134    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48135    if test $? -ne 0; then
48136      { $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
48137$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48138      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48139$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48140      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48141    fi
48142    # Collapse compiler output into a single line
48143    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48144    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48145        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48146  else
48147      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48148  fi
48149  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48150  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48151  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48152  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48153
48154  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48155$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48156
48157
48158  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48159    { $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
48160$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48162$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48163  fi
48164
48165  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48166  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48167    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48168$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48169  fi
48170
48171  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48172    { $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
48173$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48174  fi
48175
48176  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48177
48178  else
48179    # If we are not cross compiling, use the normal target compilers for
48180    # building the build platform executables.
48181    BUILD_CC="$CC"
48182    BUILD_CXX="$CXX"
48183    BUILD_LD="$LD"
48184    BUILD_LDCXX="$LDCXX"
48185    BUILD_NM="$NM"
48186    BUILD_AS="$AS"
48187    BUILD_OBJCOPY="$OBJCOPY"
48188    BUILD_STRIP="$STRIP"
48189    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48190    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48191    BUILD_AR="$AR"
48192
48193
48194  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48195    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48196$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48197    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48198$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48199  fi
48200
48201  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48202  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48203    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48204$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48205  fi
48206
48207  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48208    { $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
48209$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48210  fi
48211
48212  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48213
48214  fi
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229  # The package path is used only on macosx?
48230  # FIXME: clean this up, and/or move it elsewhere.
48231  PACKAGE_PATH=/opt/local
48232
48233
48234  # Check for extra potential brokenness.
48235  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48236    # On Windows, double-check that we got the right compiler.
48237    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48238    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48239    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48240      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48241        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
48242      fi
48243    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48244      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48245        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48246      fi
48247    fi
48248  fi
48249
48250  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48251    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48252    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48253    # This is later checked when setting flags.
48254
48255    # "-Og" suppported for GCC 4.8 and later
48256    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304    # Execute function body
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353    # Execute function body
48354
48355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48356$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48357  supports=yes
48358
48359  saved_cflags="$CFLAGS"
48360  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48361  ac_ext=c
48362ac_cpp='$CPP $CPPFLAGS'
48363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48365ac_compiler_gnu=$ac_cv_c_compiler_gnu
48366
48367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48368/* end confdefs.h.  */
48369int i;
48370_ACEOF
48371if ac_fn_c_try_compile "$LINENO"; then :
48372
48373else
48374  supports=no
48375fi
48376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48377  ac_ext=cpp
48378ac_cpp='$CXXCPP $CPPFLAGS'
48379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48382
48383  CFLAGS="$saved_cflags"
48384
48385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48386$as_echo "$supports" >&6; }
48387  if test "x$supports" = "xyes" ; then
48388    :
48389    C_COMP_SUPPORTS="yes"
48390  else
48391    :
48392    C_COMP_SUPPORTS="no"
48393  fi
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442
48443
48444
48445
48446
48447
48448
48449
48450
48451
48452
48453    # Execute function body
48454
48455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48456$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48457  supports=yes
48458
48459  saved_cxxflags="$CXXFLAGS"
48460  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48461  ac_ext=cpp
48462ac_cpp='$CXXCPP $CPPFLAGS'
48463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48466
48467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48468/* end confdefs.h.  */
48469int i;
48470_ACEOF
48471if ac_fn_cxx_try_compile "$LINENO"; then :
48472
48473else
48474  supports=no
48475fi
48476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48477  ac_ext=cpp
48478ac_cpp='$CXXCPP $CPPFLAGS'
48479ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48480ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48481ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48482
48483  CXXFLAGS="$saved_cxxflags"
48484
48485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48486$as_echo "$supports" >&6; }
48487  if test "x$supports" = "xyes" ; then
48488    :
48489    CXX_COMP_SUPPORTS="yes"
48490  else
48491    :
48492    CXX_COMP_SUPPORTS="no"
48493  fi
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48508$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48509  supports=no
48510  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48511
48512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48513$as_echo "$supports" >&6; }
48514  if test "x$supports" = "xyes" ; then
48515    :
48516    HAS_CFLAG_OPTIMIZE_DEBUG=true
48517  else
48518    :
48519    HAS_CFLAG_OPTIMIZE_DEBUG=false
48520  fi
48521
48522
48523
48524
48525
48526
48527
48528    # "-z relro" supported in GNU binutils 2.17 and later
48529    LINKER_RELRO_FLAG="-Wl,-z,relro"
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576
48577    # Execute function body
48578
48579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48580$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48581  supports=yes
48582
48583  saved_ldflags="$LDFLAGS"
48584  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48585  ac_ext=c
48586ac_cpp='$CPP $CPPFLAGS'
48587ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48588ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48589ac_compiler_gnu=$ac_cv_c_compiler_gnu
48590
48591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48592/* end confdefs.h.  */
48593
48594int
48595main ()
48596{
48597
48598  ;
48599  return 0;
48600}
48601_ACEOF
48602if ac_fn_c_try_link "$LINENO"; then :
48603
48604else
48605  supports=no
48606fi
48607rm -f core conftest.err conftest.$ac_objext \
48608    conftest$ac_exeext conftest.$ac_ext
48609  ac_ext=cpp
48610ac_cpp='$CXXCPP $CPPFLAGS'
48611ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48612ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48613ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48614
48615  LDFLAGS="$saved_ldflags"
48616
48617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48618$as_echo "$supports" >&6; }
48619  if test "x$supports" = "xyes" ; then
48620    :
48621    HAS_LINKER_RELRO=true
48622  else
48623    :
48624    HAS_LINKER_RELRO=false
48625  fi
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639    # "-z now" supported in GNU binutils 2.11 and later
48640    LINKER_NOW_FLAG="-Wl,-z,now"
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688    # Execute function body
48689
48690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48691$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48692  supports=yes
48693
48694  saved_ldflags="$LDFLAGS"
48695  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48696  ac_ext=c
48697ac_cpp='$CPP $CPPFLAGS'
48698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48700ac_compiler_gnu=$ac_cv_c_compiler_gnu
48701
48702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48703/* end confdefs.h.  */
48704
48705int
48706main ()
48707{
48708
48709  ;
48710  return 0;
48711}
48712_ACEOF
48713if ac_fn_c_try_link "$LINENO"; then :
48714
48715else
48716  supports=no
48717fi
48718rm -f core conftest.err conftest.$ac_objext \
48719    conftest$ac_exeext conftest.$ac_ext
48720  ac_ext=cpp
48721ac_cpp='$CXXCPP $CPPFLAGS'
48722ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48723ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48724ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48725
48726  LDFLAGS="$saved_ldflags"
48727
48728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48729$as_echo "$supports" >&6; }
48730  if test "x$supports" = "xyes" ; then
48731    :
48732    HAS_LINKER_NOW=true
48733  else
48734    :
48735    HAS_LINKER_NOW=false
48736  fi
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749  fi
48750
48751  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48752  # in executable.'
48753  USING_BROKEN_SUSE_LD=no
48754  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48756$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48757    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48758    $ECHO "int main() { }" > main.c
48759    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48761$as_echo "no" >&6; }
48762      USING_BROKEN_SUSE_LD=no
48763    else
48764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48765$as_echo "yes" >&6; }
48766      USING_BROKEN_SUSE_LD=yes
48767    fi
48768    $RM version-script.map main.c a.out
48769  fi
48770
48771
48772  # Setup hotspot lecagy names for toolchains
48773  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48774  if test "x$TOOLCHAIN_TYPE" = xclang; then
48775    HOTSPOT_TOOLCHAIN_TYPE=gcc
48776  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48777    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48778  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48779    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48780  fi
48781
48782
48783
48784# Setup the JTReg Regression Test Harness.
48785
48786
48787# Check whether --with-jtreg was given.
48788if test "${with_jtreg+set}" = set; then :
48789  withval=$with_jtreg;
48790else
48791  with_jtreg=no
48792fi
48793
48794
48795  if test "x$with_jtreg" = xno; then
48796    # jtreg disabled
48797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48798$as_echo_n "checking for jtreg... " >&6; }
48799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48800$as_echo "no" >&6; }
48801  else
48802    if test "x$with_jtreg" != xyes; then
48803      # with path specified.
48804      JT_HOME="$with_jtreg"
48805    fi
48806
48807    if test "x$JT_HOME" != x; then
48808      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48809$as_echo_n "checking for jtreg... " >&6; }
48810
48811      # use JT_HOME enviroment var.
48812
48813  # Only process if variable expands to non-empty
48814
48815  if test "x$JT_HOME" != x; then
48816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48817
48818  # Input might be given as Windows format, start by converting to
48819  # unix format.
48820  path="$JT_HOME"
48821  new_path=`$CYGPATH -u "$path"`
48822
48823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48826  # "foo.exe" is OK but "foo" is an error.
48827  #
48828  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48829  # It is also a way to make sure we got the proper file name for the real test later on.
48830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48831  if test "x$test_shortpath" = x; then
48832    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48833$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48834    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48835  fi
48836
48837  # Call helper function which possibly converts this using DOS-style short mode.
48838  # If so, the updated path is stored in $new_path.
48839
48840  input_path="$new_path"
48841  # Check if we need to convert this using DOS-style short mode. If the path
48842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48843  # take no chances and rewrite it.
48844  # Note: m4 eats our [], so we need to use [ and ] instead.
48845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48846  if test "x$has_forbidden_chars" != x; then
48847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48851      # Going to short mode and back again did indeed matter. Since short mode is
48852      # case insensitive, let's make it lowercase to improve readability.
48853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48854      # Now convert it back to Unix-style (cygpath)
48855      input_path=`$CYGPATH -u "$shortmode_path"`
48856      new_path="$input_path"
48857    fi
48858  fi
48859
48860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48861  if test "x$test_cygdrive_prefix" = x; then
48862    # As a simple fix, exclude /usr/bin since it's not a real path.
48863    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48865      # a path prefixed by /cygdrive for fixpath to work.
48866      new_path="$CYGWIN_ROOT_PATH$input_path"
48867    fi
48868  fi
48869
48870
48871  if test "x$path" != "x$new_path"; then
48872    JT_HOME="$new_path"
48873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48874$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48875  fi
48876
48877    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48878
48879  path="$JT_HOME"
48880  has_colon=`$ECHO $path | $GREP ^.:`
48881  new_path="$path"
48882  if test "x$has_colon" = x; then
48883    # Not in mixed or Windows style, start by that.
48884    new_path=`cmd //c echo $path`
48885  fi
48886
48887
48888  input_path="$new_path"
48889  # Check if we need to convert this using DOS-style short mode. If the path
48890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48891  # take no chances and rewrite it.
48892  # Note: m4 eats our [], so we need to use [ and ] instead.
48893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48894  if test "x$has_forbidden_chars" != x; then
48895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48897  fi
48898
48899
48900  windows_path="$new_path"
48901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48902    unix_path=`$CYGPATH -u "$windows_path"`
48903    new_path="$unix_path"
48904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48906    new_path="$unix_path"
48907  fi
48908
48909  if test "x$path" != "x$new_path"; then
48910    JT_HOME="$new_path"
48911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48912$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48913  fi
48914
48915  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48916  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48917
48918    else
48919      # We're on a unix platform. Hooray! :)
48920      path="$JT_HOME"
48921      has_space=`$ECHO "$path" | $GREP " "`
48922      if test "x$has_space" != x; then
48923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48924$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48925        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48926      fi
48927
48928      # Use eval to expand a potential ~
48929      eval path="$path"
48930      if test ! -f "$path" && test ! -d "$path"; then
48931        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48932      fi
48933
48934      if test -d "$path"; then
48935        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48936      else
48937        dir="`$DIRNAME "$path"`"
48938        base="`$BASENAME "$path"`"
48939        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48940      fi
48941    fi
48942  fi
48943
48944
48945      # jtreg win32 script works for everybody
48946      JTREGEXE="$JT_HOME/bin/jtreg"
48947
48948      if test ! -f "$JTREGEXE"; then
48949        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48950      fi
48951
48952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48953$as_echo "$JTREGEXE" >&6; }
48954    else
48955      # try to find jtreg on path
48956
48957
48958
48959  # Publish this variable in the help.
48960
48961
48962  if [ -z "${JTREGEXE+x}" ]; then
48963    # The variable is not set by user, try to locate tool using the code snippet
48964    for ac_prog in jtreg
48965do
48966  # Extract the first word of "$ac_prog", so it can be a program name with args.
48967set dummy $ac_prog; ac_word=$2
48968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48969$as_echo_n "checking for $ac_word... " >&6; }
48970if ${ac_cv_path_JTREGEXE+:} false; then :
48971  $as_echo_n "(cached) " >&6
48972else
48973  case $JTREGEXE in
48974  [\\/]* | ?:[\\/]*)
48975  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48976  ;;
48977  *)
48978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48979for as_dir in $PATH
48980do
48981  IFS=$as_save_IFS
48982  test -z "$as_dir" && as_dir=.
48983    for ac_exec_ext in '' $ac_executable_extensions; do
48984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48985    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48987    break 2
48988  fi
48989done
48990  done
48991IFS=$as_save_IFS
48992
48993  ;;
48994esac
48995fi
48996JTREGEXE=$ac_cv_path_JTREGEXE
48997if test -n "$JTREGEXE"; then
48998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48999$as_echo "$JTREGEXE" >&6; }
49000else
49001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49002$as_echo "no" >&6; }
49003fi
49004
49005
49006  test -n "$JTREGEXE" && break
49007done
49008
49009  else
49010    # The variable is set, but is it from the command line or the environment?
49011
49012    # Try to remove the string !JTREGEXE! from our list.
49013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
49014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49015      # If it failed, the variable was not from the command line. Ignore it,
49016      # but warn the user (except for BASH, which is always set by the calling BASH).
49017      if test "xJTREGEXE" != xBASH; then
49018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49019$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49020      fi
49021      # Try to locate tool using the code snippet
49022      for ac_prog in jtreg
49023do
49024  # Extract the first word of "$ac_prog", so it can be a program name with args.
49025set dummy $ac_prog; ac_word=$2
49026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49027$as_echo_n "checking for $ac_word... " >&6; }
49028if ${ac_cv_path_JTREGEXE+:} false; then :
49029  $as_echo_n "(cached) " >&6
49030else
49031  case $JTREGEXE in
49032  [\\/]* | ?:[\\/]*)
49033  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49034  ;;
49035  *)
49036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49037for as_dir in $PATH
49038do
49039  IFS=$as_save_IFS
49040  test -z "$as_dir" && as_dir=.
49041    for ac_exec_ext in '' $ac_executable_extensions; do
49042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49043    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49045    break 2
49046  fi
49047done
49048  done
49049IFS=$as_save_IFS
49050
49051  ;;
49052esac
49053fi
49054JTREGEXE=$ac_cv_path_JTREGEXE
49055if test -n "$JTREGEXE"; then
49056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49057$as_echo "$JTREGEXE" >&6; }
49058else
49059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49060$as_echo "no" >&6; }
49061fi
49062
49063
49064  test -n "$JTREGEXE" && break
49065done
49066
49067    else
49068      # If it succeeded, then it was overridden by the user. We will use it
49069      # for the tool.
49070
49071      # First remove it from the list of overridden variables, so we can test
49072      # for unknown variables in the end.
49073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49074
49075      # Check if we try to supply an empty value
49076      if test "x$JTREGEXE" = x; then
49077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49078$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49080$as_echo_n "checking for JTREGEXE... " >&6; }
49081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49082$as_echo "disabled" >&6; }
49083      else
49084        # Check if the provided tool contains a complete path.
49085        tool_specified="$JTREGEXE"
49086        tool_basename="${tool_specified##*/}"
49087        if test "x$tool_basename" = "x$tool_specified"; then
49088          # A command without a complete path is provided, search $PATH.
49089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49090$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49091          # Extract the first word of "$tool_basename", so it can be a program name with args.
49092set dummy $tool_basename; ac_word=$2
49093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49094$as_echo_n "checking for $ac_word... " >&6; }
49095if ${ac_cv_path_JTREGEXE+:} false; then :
49096  $as_echo_n "(cached) " >&6
49097else
49098  case $JTREGEXE in
49099  [\\/]* | ?:[\\/]*)
49100  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49101  ;;
49102  *)
49103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49104for as_dir in $PATH
49105do
49106  IFS=$as_save_IFS
49107  test -z "$as_dir" && as_dir=.
49108    for ac_exec_ext in '' $ac_executable_extensions; do
49109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49110    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49112    break 2
49113  fi
49114done
49115  done
49116IFS=$as_save_IFS
49117
49118  ;;
49119esac
49120fi
49121JTREGEXE=$ac_cv_path_JTREGEXE
49122if test -n "$JTREGEXE"; then
49123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49124$as_echo "$JTREGEXE" >&6; }
49125else
49126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49127$as_echo "no" >&6; }
49128fi
49129
49130
49131          if test "x$JTREGEXE" = x; then
49132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49133          fi
49134        else
49135          # Otherwise we believe it is a complete path. Use it as it is.
49136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49137$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49139$as_echo_n "checking for JTREGEXE... " >&6; }
49140          if test ! -x "$tool_specified"; then
49141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49142$as_echo "not found" >&6; }
49143            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49144          fi
49145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49146$as_echo "$tool_specified" >&6; }
49147        fi
49148      fi
49149    fi
49150
49151  fi
49152
49153
49154
49155  if test "x$JTREGEXE" = x; then
49156    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
49157  fi
49158
49159
49160      JT_HOME="`$DIRNAME $JTREGEXE`"
49161    fi
49162  fi
49163
49164
49165
49166
49167
49168
49169  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49170  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49171  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49172  #                              commands produced by the link step (currently AIX only)
49173  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49174    COMPILER_TARGET_BITS_FLAG="-q"
49175    COMPILER_COMMAND_FILE_FLAG="-f"
49176    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49177  else
49178    COMPILER_TARGET_BITS_FLAG="-m"
49179    COMPILER_COMMAND_FILE_FLAG="@"
49180    COMPILER_BINDCMD_FILE_FLAG=""
49181
49182    # The solstudio linker does not support @-files.
49183    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49184      COMPILER_COMMAND_FILE_FLAG=
49185    fi
49186
49187    # Check if @file is supported by gcc
49188    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49190$as_echo_n "checking if @file is supported by gcc... " >&6; }
49191      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49192      $ECHO "" "--version" > command.file
49193      if $CXX @command.file 2>&5 >&5; then
49194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49195$as_echo "yes" >&6; }
49196        COMPILER_COMMAND_FILE_FLAG="@"
49197      else
49198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49199$as_echo "no" >&6; }
49200        COMPILER_COMMAND_FILE_FLAG=
49201      fi
49202      $RM command.file
49203    fi
49204  fi
49205
49206
49207
49208
49209  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49210  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49211    ARFLAGS="-r"
49212  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49213    ARFLAGS="-X64"
49214  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49215    # lib.exe is used as AR to create static libraries.
49216    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49217  else
49218    ARFLAGS=""
49219  fi
49220
49221
49222  ## Setup strip.
49223  # FIXME: should this really be per platform, or should it be per toolchain type?
49224  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49225  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49226  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49227    STRIPFLAGS="-g"
49228  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49229    STRIPFLAGS="-x"
49230  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49231    STRIPFLAGS="-S"
49232  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49233    STRIPFLAGS="-X32_64"
49234  fi
49235
49236
49237
49238  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49239    CC_OUT_OPTION=-Fo
49240    EXE_OUT_OPTION=-out:
49241    LD_OUT_OPTION=-out:
49242    AR_OUT_OPTION=-out:
49243  else
49244    # The option used to specify the target .o,.a or .so file.
49245    # When compiling, how to specify the to be created object file.
49246    CC_OUT_OPTION='-o$(SPACE)'
49247    # When linking, how to specify the to be created executable.
49248    EXE_OUT_OPTION='-o$(SPACE)'
49249    # When linking, how to specify the to be created dynamically linkable library.
49250    LD_OUT_OPTION='-o$(SPACE)'
49251    # When archiving, how to specify the to be create static archive for object files.
49252    AR_OUT_OPTION='rcs$(SPACE)'
49253  fi
49254
49255
49256
49257
49258
49259  # On Windows, we need to set RC flags.
49260  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49261    RC_FLAGS="-nologo -l0x409"
49262    JVM_RCFLAGS="-nologo"
49263    if test "x$DEBUG_LEVEL" = xrelease; then
49264      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49265      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49266    fi
49267
49268    # The version variables used to create RC_FLAGS may be overridden
49269    # in a custom configure script, or possibly the command line.
49270    # Let those variables be expanded at make time in spec.gmk.
49271    # The \$ are escaped to the shell, and the $(...) variables
49272    # are evaluated by make.
49273    RC_FLAGS="$RC_FLAGS \
49274        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49275        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49276        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49277        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49278        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49279        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49280        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49281
49282    JVM_RCFLAGS="$JVM_RCFLAGS \
49283        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49284        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49285        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49286        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49287        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49288        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49289        -D\"HS_FNAME=jvm.dll\" \
49290        -D\"HS_INTERNAL_NAME=jvm\""
49291  fi
49292
49293
49294
49295  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49296    # silence copyright notice and other headers.
49297    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49298  fi
49299
49300
49301# Now we can test some aspects on the target using configure macros.
49302
49303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49304$as_echo_n "checking for ANSI C header files... " >&6; }
49305if ${ac_cv_header_stdc+:} false; then :
49306  $as_echo_n "(cached) " >&6
49307else
49308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49309/* end confdefs.h.  */
49310#include <stdlib.h>
49311#include <stdarg.h>
49312#include <string.h>
49313#include <float.h>
49314
49315int
49316main ()
49317{
49318
49319  ;
49320  return 0;
49321}
49322_ACEOF
49323if ac_fn_cxx_try_compile "$LINENO"; then :
49324  ac_cv_header_stdc=yes
49325else
49326  ac_cv_header_stdc=no
49327fi
49328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49329
49330if test $ac_cv_header_stdc = yes; then
49331  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49333/* end confdefs.h.  */
49334#include <string.h>
49335
49336_ACEOF
49337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49338  $EGREP "memchr" >/dev/null 2>&1; then :
49339
49340else
49341  ac_cv_header_stdc=no
49342fi
49343rm -f conftest*
49344
49345fi
49346
49347if test $ac_cv_header_stdc = yes; then
49348  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49350/* end confdefs.h.  */
49351#include <stdlib.h>
49352
49353_ACEOF
49354if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49355  $EGREP "free" >/dev/null 2>&1; then :
49356
49357else
49358  ac_cv_header_stdc=no
49359fi
49360rm -f conftest*
49361
49362fi
49363
49364if test $ac_cv_header_stdc = yes; then
49365  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49366  if test "$cross_compiling" = yes; then :
49367  :
49368else
49369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49370/* end confdefs.h.  */
49371#include <ctype.h>
49372#include <stdlib.h>
49373#if ((' ' & 0x0FF) == 0x020)
49374# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49375# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49376#else
49377# define ISLOWER(c) \
49378		   (('a' <= (c) && (c) <= 'i') \
49379		     || ('j' <= (c) && (c) <= 'r') \
49380		     || ('s' <= (c) && (c) <= 'z'))
49381# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49382#endif
49383
49384#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49385int
49386main ()
49387{
49388  int i;
49389  for (i = 0; i < 256; i++)
49390    if (XOR (islower (i), ISLOWER (i))
49391	|| toupper (i) != TOUPPER (i))
49392      return 2;
49393  return 0;
49394}
49395_ACEOF
49396if ac_fn_cxx_try_run "$LINENO"; then :
49397
49398else
49399  ac_cv_header_stdc=no
49400fi
49401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49402  conftest.$ac_objext conftest.beam conftest.$ac_ext
49403fi
49404
49405fi
49406fi
49407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49408$as_echo "$ac_cv_header_stdc" >&6; }
49409if test $ac_cv_header_stdc = yes; then
49410
49411$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49412
49413fi
49414
49415# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49416for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49417		  inttypes.h stdint.h unistd.h
49418do :
49419  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49420ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49421"
49422if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49423  cat >>confdefs.h <<_ACEOF
49424#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49425_ACEOF
49426
49427fi
49428
49429done
49430
49431
49432
49433  ###############################################################################
49434  #
49435  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49436  # (The JVM can use 32 or 64 bit Java pointers but that decision
49437  # is made at runtime.)
49438  #
49439
49440  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49441    # Always specify -m flag on Solaris
49442    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49443
49444  # When we add flags to the "official" CFLAGS etc, we need to
49445  # keep track of these additions in ADDED_CFLAGS etc. These
49446  # will later be checked to make sure only controlled additions
49447  # have been made to CFLAGS etc.
49448  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49449  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49450  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49451
49452  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49453  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49454  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49455
49456  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49457  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49458  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49459
49460  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49461  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49462  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49463
49464  elif test "x$COMPILE_TYPE" = xreduced; then
49465    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49466      # Specify -m if running reduced on unix platforms
49467
49468  # When we add flags to the "official" CFLAGS etc, we need to
49469  # keep track of these additions in ADDED_CFLAGS etc. These
49470  # will later be checked to make sure only controlled additions
49471  # have been made to CFLAGS etc.
49472  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49473  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49474  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49475
49476  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49477  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49478  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49479
49480  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49481  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49482  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49483
49484  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49485  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49486  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49487
49488    fi
49489  fi
49490  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49491    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49492    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49493    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49494  fi
49495
49496  # Make compilation sanity check
49497  for ac_header in stdio.h
49498do :
49499  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49500if test "x$ac_cv_header_stdio_h" = xyes; then :
49501  cat >>confdefs.h <<_ACEOF
49502#define HAVE_STDIO_H 1
49503_ACEOF
49504
49505else
49506
49507    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49508$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49509    if test "x$COMPILE_TYPE" = xreduced; then
49510
49511  # Print a helpful message on how to acquire the necessary build dependency.
49512  # reduced is the help tag: freetype, cups, alsa etc
49513  MISSING_DEPENDENCY=reduced
49514
49515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49516    cygwin_help $MISSING_DEPENDENCY
49517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49518    msys_help $MISSING_DEPENDENCY
49519  else
49520    PKGHANDLER_COMMAND=
49521
49522    case $PKGHANDLER in
49523      apt-get)
49524        apt_help     $MISSING_DEPENDENCY ;;
49525      yum)
49526        yum_help     $MISSING_DEPENDENCY ;;
49527      brew)
49528        brew_help    $MISSING_DEPENDENCY ;;
49529      port)
49530        port_help    $MISSING_DEPENDENCY ;;
49531      pkgutil)
49532        pkgutil_help $MISSING_DEPENDENCY ;;
49533      pkgadd)
49534        pkgadd_help  $MISSING_DEPENDENCY ;;
49535    esac
49536
49537    if test "x$PKGHANDLER_COMMAND" != x; then
49538      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49539    fi
49540  fi
49541
49542      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49543$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49544    elif test "x$COMPILE_TYPE" = xcross; then
49545      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49546$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49547    fi
49548    as_fn_error $? "Cannot continue." "$LINENO" 5
49549
49550fi
49551
49552done
49553
49554
49555  # The cast to long int works around a bug in the HP C Compiler
49556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49558# This bug is HP SR number 8606223364.
49559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49560$as_echo_n "checking size of int *... " >&6; }
49561if ${ac_cv_sizeof_int_p+:} false; then :
49562  $as_echo_n "(cached) " >&6
49563else
49564  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49565
49566else
49567  if test "$ac_cv_type_int_p" = yes; then
49568     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49570as_fn_error 77 "cannot compute sizeof (int *)
49571See \`config.log' for more details" "$LINENO" 5; }
49572   else
49573     ac_cv_sizeof_int_p=0
49574   fi
49575fi
49576
49577fi
49578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49579$as_echo "$ac_cv_sizeof_int_p" >&6; }
49580
49581
49582
49583cat >>confdefs.h <<_ACEOF
49584#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49585_ACEOF
49586
49587
49588
49589  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49590  if test "x$ac_cv_sizeof_int_p" = x; then
49591    # The test failed, lets stick to the assumed value.
49592    { $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
49593$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49594  else
49595    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49596
49597    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49598      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49599      # Let's try to implicitely set the compilers target architecture and retry the test
49600      { $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
49601$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;}
49602      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49603$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49604
49605  # When we add flags to the "official" CFLAGS etc, we need to
49606  # keep track of these additions in ADDED_CFLAGS etc. These
49607  # will later be checked to make sure only controlled additions
49608  # have been made to CFLAGS etc.
49609  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49610  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49611  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49612
49613  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49614  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49615  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49616
49617  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49618  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49619  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49620
49621  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49622  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49623  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49624
49625
49626      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49627      unset ac_cv_sizeof_int_p
49628      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49629      cat >>confdefs.h <<_ACEOF
49630#undef SIZEOF_INT_P
49631_ACEOF
49632
49633      # The cast to long int works around a bug in the HP C Compiler
49634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49636# This bug is HP SR number 8606223364.
49637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49638$as_echo_n "checking size of int *... " >&6; }
49639if ${ac_cv_sizeof_int_p+:} false; then :
49640  $as_echo_n "(cached) " >&6
49641else
49642  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49643
49644else
49645  if test "$ac_cv_type_int_p" = yes; then
49646     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49648as_fn_error 77 "cannot compute sizeof (int *)
49649See \`config.log' for more details" "$LINENO" 5; }
49650   else
49651     ac_cv_sizeof_int_p=0
49652   fi
49653fi
49654
49655fi
49656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49657$as_echo "$ac_cv_sizeof_int_p" >&6; }
49658
49659
49660
49661cat >>confdefs.h <<_ACEOF
49662#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49663_ACEOF
49664
49665
49666
49667      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49668
49669      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49670        { $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
49671$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;}
49672        if test "x$COMPILE_TYPE" = xreduced; then
49673
49674  # Print a helpful message on how to acquire the necessary build dependency.
49675  # reduced is the help tag: freetype, cups, alsa etc
49676  MISSING_DEPENDENCY=reduced
49677
49678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49679    cygwin_help $MISSING_DEPENDENCY
49680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49681    msys_help $MISSING_DEPENDENCY
49682  else
49683    PKGHANDLER_COMMAND=
49684
49685    case $PKGHANDLER in
49686      apt-get)
49687        apt_help     $MISSING_DEPENDENCY ;;
49688      yum)
49689        yum_help     $MISSING_DEPENDENCY ;;
49690      brew)
49691        brew_help    $MISSING_DEPENDENCY ;;
49692      port)
49693        port_help    $MISSING_DEPENDENCY ;;
49694      pkgutil)
49695        pkgutil_help $MISSING_DEPENDENCY ;;
49696      pkgadd)
49697        pkgadd_help  $MISSING_DEPENDENCY ;;
49698    esac
49699
49700    if test "x$PKGHANDLER_COMMAND" != x; then
49701      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49702    fi
49703  fi
49704
49705          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49706$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49707        elif test "x$COMPILE_TYPE" = xcross; then
49708          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49709$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49710        fi
49711        as_fn_error $? "Cannot continue." "$LINENO" 5
49712      fi
49713    fi
49714  fi
49715
49716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49717$as_echo_n "checking for target address size... " >&6; }
49718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49719$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49720
49721
49722  ###############################################################################
49723  #
49724  # Is the target little of big endian?
49725  #
49726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49727$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49728if ${ac_cv_c_bigendian+:} false; then :
49729  $as_echo_n "(cached) " >&6
49730else
49731  ac_cv_c_bigendian=unknown
49732    # See if we're dealing with a universal compiler.
49733    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49734/* end confdefs.h.  */
49735#ifndef __APPLE_CC__
49736	       not a universal capable compiler
49737	     #endif
49738	     typedef int dummy;
49739
49740_ACEOF
49741if ac_fn_cxx_try_compile "$LINENO"; then :
49742
49743	# Check for potential -arch flags.  It is not universal unless
49744	# there are at least two -arch flags with different values.
49745	ac_arch=
49746	ac_prev=
49747	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49748	 if test -n "$ac_prev"; then
49749	   case $ac_word in
49750	     i?86 | x86_64 | ppc | ppc64)
49751	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49752		 ac_arch=$ac_word
49753	       else
49754		 ac_cv_c_bigendian=universal
49755		 break
49756	       fi
49757	       ;;
49758	   esac
49759	   ac_prev=
49760	 elif test "x$ac_word" = "x-arch"; then
49761	   ac_prev=arch
49762	 fi
49763       done
49764fi
49765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49766    if test $ac_cv_c_bigendian = unknown; then
49767      # See if sys/param.h defines the BYTE_ORDER macro.
49768      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49769/* end confdefs.h.  */
49770#include <sys/types.h>
49771	     #include <sys/param.h>
49772
49773int
49774main ()
49775{
49776#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49777		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49778		     && LITTLE_ENDIAN)
49779	      bogus endian macros
49780	     #endif
49781
49782  ;
49783  return 0;
49784}
49785_ACEOF
49786if ac_fn_cxx_try_compile "$LINENO"; then :
49787  # It does; now see whether it defined to BIG_ENDIAN or not.
49788	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49789/* end confdefs.h.  */
49790#include <sys/types.h>
49791		#include <sys/param.h>
49792
49793int
49794main ()
49795{
49796#if BYTE_ORDER != BIG_ENDIAN
49797		 not big endian
49798		#endif
49799
49800  ;
49801  return 0;
49802}
49803_ACEOF
49804if ac_fn_cxx_try_compile "$LINENO"; then :
49805  ac_cv_c_bigendian=yes
49806else
49807  ac_cv_c_bigendian=no
49808fi
49809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49810fi
49811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49812    fi
49813    if test $ac_cv_c_bigendian = unknown; then
49814      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49815      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49816/* end confdefs.h.  */
49817#include <limits.h>
49818
49819int
49820main ()
49821{
49822#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49823	      bogus endian macros
49824	     #endif
49825
49826  ;
49827  return 0;
49828}
49829_ACEOF
49830if ac_fn_cxx_try_compile "$LINENO"; then :
49831  # It does; now see whether it defined to _BIG_ENDIAN or not.
49832	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49833/* end confdefs.h.  */
49834#include <limits.h>
49835
49836int
49837main ()
49838{
49839#ifndef _BIG_ENDIAN
49840		 not big endian
49841		#endif
49842
49843  ;
49844  return 0;
49845}
49846_ACEOF
49847if ac_fn_cxx_try_compile "$LINENO"; then :
49848  ac_cv_c_bigendian=yes
49849else
49850  ac_cv_c_bigendian=no
49851fi
49852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49853fi
49854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49855    fi
49856    if test $ac_cv_c_bigendian = unknown; then
49857      # Compile a test program.
49858      if test "$cross_compiling" = yes; then :
49859  # Try to guess by grepping values from an object file.
49860	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49861/* end confdefs.h.  */
49862short int ascii_mm[] =
49863		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49864		short int ascii_ii[] =
49865		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49866		int use_ascii (int i) {
49867		  return ascii_mm[i] + ascii_ii[i];
49868		}
49869		short int ebcdic_ii[] =
49870		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49871		short int ebcdic_mm[] =
49872		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49873		int use_ebcdic (int i) {
49874		  return ebcdic_mm[i] + ebcdic_ii[i];
49875		}
49876		extern int foo;
49877
49878int
49879main ()
49880{
49881return use_ascii (foo) == use_ebcdic (foo);
49882  ;
49883  return 0;
49884}
49885_ACEOF
49886if ac_fn_cxx_try_compile "$LINENO"; then :
49887  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49888	      ac_cv_c_bigendian=yes
49889	    fi
49890	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49891	      if test "$ac_cv_c_bigendian" = unknown; then
49892		ac_cv_c_bigendian=no
49893	      else
49894		# finding both strings is unlikely to happen, but who knows?
49895		ac_cv_c_bigendian=unknown
49896	      fi
49897	    fi
49898fi
49899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49900else
49901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49902/* end confdefs.h.  */
49903$ac_includes_default
49904int
49905main ()
49906{
49907
49908	     /* Are we little or big endian?  From Harbison&Steele.  */
49909	     union
49910	     {
49911	       long int l;
49912	       char c[sizeof (long int)];
49913	     } u;
49914	     u.l = 1;
49915	     return u.c[sizeof (long int) - 1] == 1;
49916
49917  ;
49918  return 0;
49919}
49920_ACEOF
49921if ac_fn_cxx_try_run "$LINENO"; then :
49922  ac_cv_c_bigendian=no
49923else
49924  ac_cv_c_bigendian=yes
49925fi
49926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49927  conftest.$ac_objext conftest.beam conftest.$ac_ext
49928fi
49929
49930    fi
49931fi
49932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49933$as_echo "$ac_cv_c_bigendian" >&6; }
49934 case $ac_cv_c_bigendian in #(
49935   yes)
49936     ENDIAN="big";; #(
49937   no)
49938     ENDIAN="little" ;; #(
49939   universal)
49940     ENDIAN="universal_endianness"
49941     ;; #(
49942   *)
49943     ENDIAN="unknown" ;;
49944 esac
49945
49946
49947  if test "x$ENDIAN" = xuniversal_endianness; then
49948    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49949  fi
49950  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49951    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
49952  fi
49953
49954
49955# Configure flags for the tools
49956
49957  ###############################################################################
49958  #
49959  # How to compile shared libraries.
49960  #
49961
49962  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49963    PICFLAG="-fPIC"
49964    C_FLAG_REORDER=''
49965    CXX_FLAG_REORDER=''
49966
49967    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49968      # Linking is different on MacOSX
49969      if test "x$STATIC_BUILD" = xtrue; then
49970        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49971      else
49972        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49973        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49974      fi
49975      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49976      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49977      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49978      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49979    else
49980      # Default works for linux, might work on other platforms as well.
49981      SHARED_LIBRARY_FLAGS='-shared'
49982      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49983      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49984      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49985      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49986    fi
49987  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49988    C_FLAG_REORDER=''
49989    CXX_FLAG_REORDER=''
49990
49991    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49992      # Linking is different on MacOSX
49993      PICFLAG=''
49994      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49995      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49996      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49997      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49998      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49999
50000      if test "x$STATIC_BUILD" = xfalse; then
50001        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50002      fi
50003    else
50004      # Default works for linux, might work on other platforms as well.
50005      PICFLAG='-fPIC'
50006      SHARED_LIBRARY_FLAGS='-shared'
50007      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50008      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50009      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50010
50011      # arm specific settings
50012      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50013        # '-Wl,-z,origin' isn't used on arm.
50014        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50015      else
50016        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50017      fi
50018
50019    fi
50020  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50021    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50022      PICFLAG="-xcode=pic32"
50023    else
50024      PICFLAG="-KPIC"
50025    fi
50026    C_FLAG_REORDER='-xF'
50027    CXX_FLAG_REORDER='-xF'
50028    SHARED_LIBRARY_FLAGS="-G"
50029    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50030    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50031    SET_SHARED_LIBRARY_NAME='-h $1'
50032    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50033  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50034    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50035    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50036    # will have to patch this single instruction with a call to some out-of-order code which
50037    # does the load from the TOC. This is of course slow. But in that case we also would have
50038    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50039    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50040    # can be patched directly by the linker and does not require a jump to out-of-order code.
50041    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50042    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50043    # loads for accessing a global variable). But there are rumors that this may be seen as a
50044    # 'performance feature' because of improved code locality of the symbols used in a
50045    # compilation unit.
50046    PICFLAG="-qpic"
50047    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50048    C_FLAG_REORDER=''
50049    CXX_FLAG_REORDER=''
50050    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50051    SET_EXECUTABLE_ORIGIN=""
50052    SET_SHARED_LIBRARY_ORIGIN=''
50053    SET_SHARED_LIBRARY_NAME=''
50054    SET_SHARED_LIBRARY_MAPFILE=''
50055  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50056    PICFLAG=""
50057    C_FLAG_REORDER=''
50058    CXX_FLAG_REORDER=''
50059    SHARED_LIBRARY_FLAGS="-dll"
50060    SET_EXECUTABLE_ORIGIN=''
50061    SET_SHARED_LIBRARY_ORIGIN=''
50062    SET_SHARED_LIBRARY_NAME=''
50063    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50064  fi
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074  # The (cross) compiler is now configured, we can now test capabilities
50075  # of the target platform.
50076
50077
50078
50079  ###############################################################################
50080  #
50081  # Setup the opt flags for different compilers
50082  # and different operating systems.
50083  #
50084
50085  # FIXME: this was indirectly the old default, but just inherited.
50086  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50087  #   C_FLAG_DEPS="-MMD -MF"
50088  # fi
50089
50090  # Generate make dependency files
50091  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50092    C_FLAG_DEPS="-MMD -MF"
50093  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50094    C_FLAG_DEPS="-MMD -MF"
50095  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50096    C_FLAG_DEPS="-xMMD -xMF"
50097  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50098    C_FLAG_DEPS="-qmakedep=gcc -MF"
50099  fi
50100  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50101
50102
50103
50104  # Debug symbols
50105  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50106    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50107      # reduce from default "-g2" option to save space
50108      CFLAGS_DEBUG_SYMBOLS="-g1"
50109      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50110    else
50111      CFLAGS_DEBUG_SYMBOLS="-g"
50112      CXXFLAGS_DEBUG_SYMBOLS="-g"
50113    fi
50114  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50115    CFLAGS_DEBUG_SYMBOLS="-g"
50116    CXXFLAGS_DEBUG_SYMBOLS="-g"
50117  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50118    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50119    # -g0 enables debug symbols without disabling inlining.
50120    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50121  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50122    CFLAGS_DEBUG_SYMBOLS="-g"
50123    CXXFLAGS_DEBUG_SYMBOLS="-g"
50124  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50125    CFLAGS_DEBUG_SYMBOLS="-Zi"
50126    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50127  fi
50128
50129
50130
50131  # Debug symbols for JVM_CFLAGS
50132  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50133    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50134    if test "x$DEBUG_LEVEL" = xslowdebug; then
50135      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50136    else
50137      # -g0 does not disable inlining, which -g does.
50138      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50139    fi
50140  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50141    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50142  else
50143    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50144  fi
50145
50146
50147  # bounds, memory and behavior checking options
50148  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50149    case $DEBUG_LEVEL in
50150    release )
50151      # no adjustment
50152      ;;
50153    fastdebug )
50154      # no adjustment
50155      ;;
50156    slowdebug )
50157      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50158      # get's added conditionally on whether we produce debug symbols or not.
50159      # This is most likely not really correct.
50160
50161      # Add runtime stack smashing and undefined behavior checks.
50162      # Not all versions of gcc support -fstack-protector
50163      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206    # Execute function body
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
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    # Execute function body
50256
50257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50258$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50259  supports=yes
50260
50261  saved_cflags="$CFLAGS"
50262  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50263  ac_ext=c
50264ac_cpp='$CPP $CPPFLAGS'
50265ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50266ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50267ac_compiler_gnu=$ac_cv_c_compiler_gnu
50268
50269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50270/* end confdefs.h.  */
50271int i;
50272_ACEOF
50273if ac_fn_c_try_compile "$LINENO"; then :
50274
50275else
50276  supports=no
50277fi
50278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50279  ac_ext=cpp
50280ac_cpp='$CXXCPP $CPPFLAGS'
50281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50284
50285  CFLAGS="$saved_cflags"
50286
50287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50288$as_echo "$supports" >&6; }
50289  if test "x$supports" = "xyes" ; then
50290    :
50291    C_COMP_SUPPORTS="yes"
50292  else
50293    :
50294    C_COMP_SUPPORTS="no"
50295  fi
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
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    # Execute function body
50356
50357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50358$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50359  supports=yes
50360
50361  saved_cxxflags="$CXXFLAGS"
50362  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50363  ac_ext=cpp
50364ac_cpp='$CXXCPP $CPPFLAGS'
50365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50368
50369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50370/* end confdefs.h.  */
50371int i;
50372_ACEOF
50373if ac_fn_cxx_try_compile "$LINENO"; then :
50374
50375else
50376  supports=no
50377fi
50378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50379  ac_ext=cpp
50380ac_cpp='$CXXCPP $CPPFLAGS'
50381ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50382ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50383ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50384
50385  CXXFLAGS="$saved_cxxflags"
50386
50387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50388$as_echo "$supports" >&6; }
50389  if test "x$supports" = "xyes" ; then
50390    :
50391    CXX_COMP_SUPPORTS="yes"
50392  else
50393    :
50394    CXX_COMP_SUPPORTS="no"
50395  fi
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50410$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50411  supports=no
50412  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50413
50414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50415$as_echo "$supports" >&6; }
50416  if test "x$supports" = "xyes" ; then
50417    :
50418
50419  else
50420    :
50421    STACK_PROTECTOR_CFLAG=""
50422  fi
50423
50424
50425
50426
50427
50428
50429
50430      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50431      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50432      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50433        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50434      fi
50435      ;;
50436    esac
50437  fi
50438
50439  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50440    if test "x$DEBUG_LEVEL" != xrelease; then
50441      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50442        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50443      fi
50444    fi
50445  fi
50446
50447  # Optimization levels
50448  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50449    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50450
50451    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50452      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50453      C_O_FLAG_HIGHEST_JVM="-xO4"
50454      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50455      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50456      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50457      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50458      C_O_FLAG_DEBUG_JVM=""
50459      C_O_FLAG_NONE="-xregs=no%frameptr"
50460      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50461      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50462      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50463      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50464      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50465      CXX_O_FLAG_DEBUG_JVM=""
50466      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50467      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50468        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50469        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50470      fi
50471    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50472      C_O_FLAG_HIGHEST_JVM="-xO4"
50473      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50474      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50475      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50476      C_O_FLAG_DEBUG=""
50477      C_O_FLAG_DEBUG_JVM=""
50478      C_O_FLAG_NONE=""
50479      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50480      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50481      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50482      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50483      CXX_O_FLAG_DEBUG=""
50484      CXX_O_FLAG_DEBUG_JVM=""
50485      CXX_O_FLAG_NONE=""
50486    fi
50487  else
50488    # The remaining toolchains share opt flags between CC and CXX;
50489    # setup for C and duplicate afterwards.
50490    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50491      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50492        # On MacOSX we optimize for size, something
50493        # we should do for all platforms?
50494        C_O_FLAG_HIGHEST_JVM="-Os"
50495        C_O_FLAG_HIGHEST="-Os"
50496        C_O_FLAG_HI="-Os"
50497        C_O_FLAG_NORM="-Os"
50498        C_O_FLAG_SIZE="-Os"
50499      else
50500        C_O_FLAG_HIGHEST_JVM="-O3"
50501        C_O_FLAG_HIGHEST="-O3"
50502        C_O_FLAG_HI="-O3"
50503        C_O_FLAG_NORM="-O2"
50504        C_O_FLAG_SIZE="-Os"
50505      fi
50506      C_O_FLAG_DEBUG="-O0"
50507      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50508        C_O_FLAG_DEBUG_JVM=""
50509      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50510        C_O_FLAG_DEBUG_JVM="-O0"
50511      fi
50512      C_O_FLAG_NONE="-O0"
50513    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50514      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50515        # On MacOSX we optimize for size, something
50516        # we should do for all platforms?
50517        C_O_FLAG_HIGHEST_JVM="-Os"
50518        C_O_FLAG_HIGHEST="-Os"
50519        C_O_FLAG_HI="-Os"
50520        C_O_FLAG_NORM="-Os"
50521        C_O_FLAG_SIZE="-Os"
50522      else
50523        C_O_FLAG_HIGHEST_JVM="-O3"
50524        C_O_FLAG_HIGHEST="-O3"
50525        C_O_FLAG_HI="-O3"
50526        C_O_FLAG_NORM="-O2"
50527        C_O_FLAG_SIZE="-Os"
50528      fi
50529      C_O_FLAG_DEBUG="-O0"
50530      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50531        C_O_FLAG_DEBUG_JVM=""
50532      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50533        C_O_FLAG_DEBUG_JVM="-O0"
50534      fi
50535      C_O_FLAG_NONE="-O0"
50536    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50537      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50538      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50539      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50540      C_O_FLAG_NORM="-O2"
50541      C_O_FLAG_DEBUG="-qnoopt"
50542      # FIXME: Value below not verified.
50543      C_O_FLAG_DEBUG_JVM=""
50544      C_O_FLAG_NONE="-qnoopt"
50545    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50546      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50547      C_O_FLAG_HIGHEST="-O2"
50548      C_O_FLAG_HI="-O1"
50549      C_O_FLAG_NORM="-O1"
50550      C_O_FLAG_DEBUG="-Od"
50551      C_O_FLAG_DEBUG_JVM=""
50552      C_O_FLAG_NONE="-Od"
50553      C_O_FLAG_SIZE="-Os"
50554    fi
50555    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50556    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50557    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50558    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50559    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50560    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50561    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50562    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50563  fi
50564
50565  # Adjust optimization flags according to debug level.
50566  case $DEBUG_LEVEL in
50567    release )
50568      # no adjustment
50569      ;;
50570    fastdebug )
50571      # Not quite so much optimization
50572      C_O_FLAG_HI="$C_O_FLAG_NORM"
50573      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50574      ;;
50575    slowdebug )
50576      # Disable optimization
50577      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50578      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50579      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50580      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50581      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50582      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50583      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50584      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50585      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50586      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50587      ;;
50588  esac
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609# Check whether --with-abi-profile was given.
50610if test "${with_abi_profile+set}" = set; then :
50611  withval=$with_abi_profile;
50612fi
50613
50614
50615  if test "x$with_abi_profile" != x; then
50616    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50617        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50618      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50619    fi
50620
50621    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50623$as_echo_n "checking for ABI profle... " >&6; }
50624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50625$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50626
50627    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50628      ARM_FLOAT_TYPE=vfp-sflt
50629      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50630    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50631      ARM_FLOAT_TYPE=vfp-hflt
50632      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50633    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50634      ARM_FLOAT_TYPE=sflt
50635      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50636    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50637      ARM_FLOAT_TYPE=vfp-sflt
50638      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50639    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50640      ARM_FLOAT_TYPE=vfp-hflt
50641      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50642    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50643      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50644      ARM_FLOAT_TYPE=
50645      ARM_ARCH_TYPE_FLAGS=
50646    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50647      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50648      ARM_FLOAT_TYPE=
50649      ARM_ARCH_TYPE_FLAGS=
50650    else
50651      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50652    fi
50653
50654    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50655      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50656    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50657      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50658    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50659      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50660    fi
50661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50662$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50664$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50665
50666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50667$as_echo_n "checking for arch type flags... " >&6; }
50668    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50669$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50670
50671    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50672    # autoconf target triplet.
50673     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50674    # Sanity check that it is a known ABI.
50675    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50676        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50677        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50678          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50679$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50680    fi
50681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50682$as_echo_n "checking for ABI property name... " >&6; }
50683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50684$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50685
50686
50687    # Pass these on to the open part of configure as if they were set using
50688    # --with-extra-c[xx]flags.
50689    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50690    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50691    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50692    # FIXME: This should not really be set using extra_cflags.
50693    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50694        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50695        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50696    fi
50697    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50698    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50699    # And pass the architecture flags to the linker as well
50700    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50701  fi
50702
50703  # When building with an abi profile, the name of that profile is appended on the
50704  # bundle platform, which is used in bundle names.
50705  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50706    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50707  fi
50708
50709
50710  # Special extras...
50711  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50712    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50713      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50714      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50715    fi
50716    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50717    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50718  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50719    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50720    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50721  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50722    CXXSTD_CXXFLAG="-std=gnu++98"
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765    # Execute function body
50766
50767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50768$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50769  supports=yes
50770
50771  saved_cxxflags="$CXXFLAGS"
50772  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50773  ac_ext=cpp
50774ac_cpp='$CXXCPP $CPPFLAGS'
50775ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50776ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50777ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50778
50779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50780/* end confdefs.h.  */
50781int i;
50782_ACEOF
50783if ac_fn_cxx_try_compile "$LINENO"; then :
50784
50785else
50786  supports=no
50787fi
50788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50789  ac_ext=cpp
50790ac_cpp='$CXXCPP $CPPFLAGS'
50791ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50792ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50793ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50794
50795  CXXFLAGS="$saved_cxxflags"
50796
50797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50798$as_echo "$supports" >&6; }
50799  if test "x$supports" = "xyes" ; then
50800    :
50801
50802  else
50803    :
50804    CXXSTD_CXXFLAG=""
50805  fi
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50819    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50820
50821  fi
50822  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50823    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50824    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50825  fi
50826
50827  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50828  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50829  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50830
50831  ###############################################################################
50832  #
50833  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50834  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50835  #
50836
50837  # Setup compiler/platform specific flags into
50838  #    CFLAGS_JDK    - C Compiler flags
50839  #    CXXFLAGS_JDK  - C++ Compiler flags
50840  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50841  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50842    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50843    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50844    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50845    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50846      # Force compatibility with i586 on 32 bit intel platforms.
50847      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50848      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50849    fi
50850    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50851        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50852    case $OPENJDK_TARGET_CPU_ARCH in
50853      arm )
50854        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50855        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50856        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50857        ;;
50858      ppc )
50859        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50860        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50861        ;;
50862      s390 )
50863        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50864        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50865        ;;
50866      * )
50867        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50868        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50869        ;;
50870    esac
50871
50872
50873
50874
50875
50876
50877
50878
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925    # Execute function body
50926
50927  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50928  REFERENCE_VERSION=6
50929
50930  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50931    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50932  fi
50933
50934  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50935    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50936  fi
50937
50938  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50939  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50940
50941  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50942    :
50943
50944  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50945  # runs afoul of the more aggressive versions of these optimisations.
50946  # Notably, value range propagation now assumes that the this pointer of C++
50947  # member functions is non-null.
50948  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50949        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50950        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50951$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50952  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50953  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50954
50955  else
50956    :
50957
50958  fi
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50974    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50975
50976    # Restrict the debug information created by Clang to avoid
50977    # too big object files and speed the build up a little bit
50978    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50979    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50980    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50981      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50982        # Force compatibility with i586 on 32 bit intel platforms.
50983        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50984        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50985      fi
50986      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50987      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50988          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50989      case $OPENJDK_TARGET_CPU_ARCH in
50990        ppc )
50991          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50992          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50993          ;;
50994        * )
50995          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50996          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50997          ;;
50998      esac
50999    fi
51000  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51001    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51002    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51003    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51004      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51005    fi
51006
51007    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51008    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51009  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51010    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51011    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51012    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51013  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51014    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51015        -MD -Zc:wchar_t- -W3 -wd4800 \
51016        -DWIN32_LEAN_AND_MEAN \
51017        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51018        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51019        -DWIN32 -DIAL"
51020    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51021      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51022    else
51023      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51024    fi
51025    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51026    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51027    # studio.
51028    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51029      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51030      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51031      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51032    fi
51033  fi
51034
51035  ###############################################################################
51036
51037  # Adjust flags according to debug level.
51038  case $DEBUG_LEVEL in
51039    fastdebug | slowdebug )
51040      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51041      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51042      ;;
51043    release )
51044      ;;
51045    * )
51046      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51047      ;;
51048  esac
51049
51050  # Set some common defines. These works for all compilers, but assume
51051  # -D is universally accepted.
51052
51053  # Setup endianness
51054  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51055    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51056    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51057    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51058    #   Note: -Dmacro         is the same as    #define macro 1
51059    #         -Dmacro=        is the same as    #define macro
51060    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51061      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51062    else
51063      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51064    fi
51065  else
51066    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51067    # are defined in the system?
51068    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51069      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51070    else
51071      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51072    fi
51073  fi
51074
51075  # Setup target OS define. Use OS target name but in upper case.
51076  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51077  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51078
51079  # Setup target CPU
51080  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51081      $OPENJDK_TARGET_ADD_LP64 \
51082      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51083
51084  # Setup debug/release defines
51085  if test "x$DEBUG_LEVEL" = xrelease; then
51086    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51087    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51088      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51089    fi
51090  else
51091    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51092  fi
51093
51094  # Set some additional per-OS defines.
51095  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51096    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51097    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51098        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51099  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51100    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51101    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51102        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51103  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51104    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51105    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51106    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51107    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51108        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51109        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51110        -fno-omit-frame-pointer"
51111  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51112    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51113    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51114    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51115        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51116        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51117  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51118    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51119  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51120    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51121    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51122  fi
51123
51124  # Set some additional per-CPU defines.
51125  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51126    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51127  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51128    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51129  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51130    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51131      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51132      # fixes `relocation truncated to fit' error for gcc 4.1.
51133      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51134      # Use ppc64 instructions, but schedule for power5
51135      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51136    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51137      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51138    fi
51139  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51140    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51141      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51142      # Little endian machine uses ELFv2 ABI.
51143      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51144      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51145      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51146    fi
51147  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51148    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51149      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51150    fi
51151  fi
51152
51153  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51154    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51155  fi
51156
51157  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51158    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51159      # Solaris does not have _LP64=1 in the old build.
51160      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51161      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51162    fi
51163  fi
51164
51165  # Set JVM_CFLAGS warning handling
51166  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51167    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51168        -Wunused-value -Woverloaded-virtual"
51169
51170    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
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    # Execute function body
51226
51227  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51228  REFERENCE_VERSION=4.8
51229
51230  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51231    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51232  fi
51233
51234  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51235    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51236  fi
51237
51238  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51239  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51240
51241  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51242    :
51243
51244            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51245            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51246
51247
51248  else
51249    :
51250
51251  fi
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266    fi
51267    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51268      # Non-zero builds have stricter warnings
51269      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51270    else
51271      if test "x$TOOLCHAIN_TYPE" = xclang; then
51272        # Some versions of llvm do not like -Wundef
51273        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51274      fi
51275    fi
51276  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51277    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51278        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51279  fi
51280
51281  # Additional macosx handling
51282  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51283    # Setting these parameters makes it an error to link to macosx APIs that are
51284    # newer than the given OS version and makes the linked binaries compatible
51285    # even if built on a newer version of the OS.
51286    # The expected format is X.Y.Z
51287    MACOSX_VERSION_MIN=10.7.0
51288
51289
51290    # The macro takes the version with no dots, ex: 1070
51291    # Let the flags variables get resolved in make for easier override on make
51292    # command line.
51293    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51294    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51295  fi
51296
51297  # Setup some hard coded includes
51298  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51299      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51300      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51301      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51302      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51303      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51304      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51305
51306  # The shared libraries are compiled using the picflag.
51307  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51308      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51309  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51310      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51311
51312  # Executable flags
51313  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51314  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51315
51316
51317
51318
51319
51320
51321  # Setup LDFLAGS et al.
51322  #
51323
51324  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51325    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51326    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51327    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51328    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51329      LDFLAGS_SAFESH="-safeseh"
51330      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51331      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51332      # NOTE: Old build added -machine. Probably not needed.
51333      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51334    else
51335      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51336    fi
51337  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51338      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51339      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51340        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51341        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51342    fi
51343  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51344    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51345    # We have previously set HAS_GNU_HASH if this is the case
51346    if test -n "$HAS_GNU_HASH"; then
51347      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51348      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51349      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51350    fi
51351      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51352        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51353    fi
51354    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51355      # And since we now know that the linker is gnu, then add -z defs, to forbid
51356      # undefined symbols in object files.
51357      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51358      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51359      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51360      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51361      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51362      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51363        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51364      fi
51365      case $DEBUG_LEVEL in
51366        release )
51367          # tell linker to optimize libraries.
51368          # Should this be supplied to the OSS linker as well?
51369          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51370          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51371          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51372          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51373            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51374          fi
51375          ;;
51376        slowdebug )
51377          # Hotspot always let the linker optimize
51378          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51379          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51380            # do relocations at load
51381            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51382            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51383            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51384          fi
51385          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51386            # mark relocations read only
51387            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51388            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51389            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51390          fi
51391          ;;
51392        fastdebug )
51393          # Hotspot always let the linker optimize
51394          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51395          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51396            # mark relocations read only
51397            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51398            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51399            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51400          fi
51401          ;;
51402        * )
51403          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51404          ;;
51405        esac
51406    fi
51407  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51408    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51409    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51410    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51411    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51412    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51413    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51414      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51415    fi
51416  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51417    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51418    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51419    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51420  fi
51421
51422  # Customize LDFLAGS for executables
51423
51424  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51425
51426  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51427    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51428      LDFLAGS_STACK_SIZE=1048576
51429    else
51430      LDFLAGS_STACK_SIZE=327680
51431    fi
51432    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51433  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51434    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51435  fi
51436
51437  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51438
51439  # Customize LDFLAGS for libs
51440  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51441
51442  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51443  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51444    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51445        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51446    JDKLIB_LIBS=""
51447  else
51448    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51449        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51450
51451    if test "xTARGET" = "xTARGET"; then
51452      # On some platforms (mac) the linker warns about non existing -L dirs.
51453      # For any of the variants server, client or minimal, the dir matches the
51454      # variant name. The "main" variant should be used for linking. For the
51455      # rest, the dir is just server.
51456      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51457          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51458        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51459            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51460      else
51461        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51462            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51463      fi
51464    elif test "xTARGET" = "xBUILD"; then
51465      # When building a buildjdk, it's always only the server variant
51466      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51467          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51468    fi
51469
51470    JDKLIB_LIBS="-ljava -ljvm"
51471    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51472      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51473    fi
51474
51475  fi
51476
51477LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51478
51479  # Set JVM_LIBS (per os)
51480  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51481    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51482  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51483    # FIXME: This hard-coded path is not really proper.
51484    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51485      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51486    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51487      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51488    fi
51489    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51490        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51491  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51492    JVM_LIBS="$JVM_LIBS -lm"
51493  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51494    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51495  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51496    JVM_LIBS="$JVM_LIBS -lm"
51497  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51498    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51499        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51500        wsock32.lib winmm.lib version.lib psapi.lib"
51501    fi
51502
51503  # Set JVM_ASFLAGS
51504  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51505    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51506      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51507    fi
51508  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51509    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51510  fi
51511
51512  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528  # Special extras...
51529  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51530    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51531      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51532      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51533    fi
51534    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51535    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51536  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51537    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51538    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51539  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51540    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583    # Execute function body
51584
51585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51586$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51587  supports=yes
51588
51589  saved_cxxflags="$CXXFLAGS"
51590  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51591  ac_ext=cpp
51592ac_cpp='$CXXCPP $CPPFLAGS'
51593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51596
51597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51598/* end confdefs.h.  */
51599int i;
51600_ACEOF
51601if ac_fn_cxx_try_compile "$LINENO"; then :
51602
51603else
51604  supports=no
51605fi
51606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51607  ac_ext=cpp
51608ac_cpp='$CXXCPP $CPPFLAGS'
51609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51612
51613  CXXFLAGS="$saved_cxxflags"
51614
51615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51616$as_echo "$supports" >&6; }
51617  if test "x$supports" = "xyes" ; then
51618    :
51619
51620  else
51621    :
51622    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51623  fi
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51637    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51638
51639  fi
51640  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51641    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51642    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51643  fi
51644
51645  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51646  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51647  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51648
51649  ###############################################################################
51650  #
51651  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51652  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51653  #
51654
51655  # Setup compiler/platform specific flags into
51656  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51657  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51658  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51659  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51660    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51661    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51662    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51663    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51664      # Force compatibility with i586 on 32 bit intel platforms.
51665      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51666      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51667    fi
51668    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51669        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51670    case $OPENJDK_BUILD_CPU_ARCH in
51671      arm )
51672        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51673        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51674        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51675        ;;
51676      ppc )
51677        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51678        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51679        ;;
51680      s390 )
51681        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51682        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51683        ;;
51684      * )
51685        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51686        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51687        ;;
51688    esac
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743    # Execute function body
51744
51745  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51746  REFERENCE_VERSION=6
51747
51748  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51749    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51750  fi
51751
51752  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51753    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51754  fi
51755
51756  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51757  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51758
51759  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51760    :
51761
51762  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51763  # runs afoul of the more aggressive versions of these optimisations.
51764  # Notably, value range propagation now assumes that the this pointer of C++
51765  # member functions is non-null.
51766  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51767        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51768        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51769$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51770  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51771  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51772
51773  else
51774    :
51775
51776  fi
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51792    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51793
51794    # Restrict the debug information created by Clang to avoid
51795    # too big object files and speed the build up a little bit
51796    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51797    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51798    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51799      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51800        # Force compatibility with i586 on 32 bit intel platforms.
51801        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51802        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51803      fi
51804      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51805      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51806          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51807      case $OPENJDK_BUILD_CPU_ARCH in
51808        ppc )
51809          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51810          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51811          ;;
51812        * )
51813          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51814          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51815          ;;
51816      esac
51817    fi
51818  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51819    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51820    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51821    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51822      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51823    fi
51824
51825    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51826    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51827  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51828    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51829    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51830    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51831  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51832    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51833        -MD -Zc:wchar_t- -W3 -wd4800 \
51834        -DWIN32_LEAN_AND_MEAN \
51835        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51836        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51837        -DWIN32 -DIAL"
51838    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51839      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51840    else
51841      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51842    fi
51843    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51844    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51845    # studio.
51846    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51847      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51848      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51849      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51850    fi
51851  fi
51852
51853  ###############################################################################
51854
51855  # Adjust flags according to debug level.
51856  case $DEBUG_LEVEL in
51857    fastdebug | slowdebug )
51858      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51859      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51860      ;;
51861    release )
51862      ;;
51863    * )
51864      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51865      ;;
51866  esac
51867
51868  # Set some common defines. These works for all compilers, but assume
51869  # -D is universally accepted.
51870
51871  # Setup endianness
51872  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51873    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51874    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51875    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51876    #   Note: -Dmacro         is the same as    #define macro 1
51877    #         -Dmacro=        is the same as    #define macro
51878    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51879      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51880    else
51881      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51882    fi
51883  else
51884    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51885    # are defined in the system?
51886    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51887      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51888    else
51889      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51890    fi
51891  fi
51892
51893  # Setup target OS define. Use OS target name but in upper case.
51894  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51895  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51896
51897  # Setup target CPU
51898  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51899      $OPENJDK_BUILD_ADD_LP64 \
51900      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51901
51902  # Setup debug/release defines
51903  if test "x$DEBUG_LEVEL" = xrelease; then
51904    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51905    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51906      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51907    fi
51908  else
51909    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51910  fi
51911
51912  # Set some additional per-OS defines.
51913  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51914    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51915    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51916        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51917  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51918    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51919    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51920        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51921  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51922    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51923    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51924    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51925    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51926        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51927        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51928        -fno-omit-frame-pointer"
51929  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51930    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51931    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51932    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51933        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51934        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51935  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51936    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51937  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51938    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51939    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51940  fi
51941
51942  # Set some additional per-CPU defines.
51943  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51944    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51945  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51946    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51947  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51948    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51949      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51950      # fixes `relocation truncated to fit' error for gcc 4.1.
51951      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51952      # Use ppc64 instructions, but schedule for power5
51953      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51954    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51955      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51956    fi
51957  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51958    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51959      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51960      # Little endian machine uses ELFv2 ABI.
51961      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51962      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51963      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51964    fi
51965  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51966    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51967      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51968    fi
51969  fi
51970
51971  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51972    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51973  fi
51974
51975  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51976    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51977      # Solaris does not have _LP64=1 in the old build.
51978      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51979      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51980    fi
51981  fi
51982
51983  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51984  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51985    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51986        -Wunused-value -Woverloaded-virtual"
51987
51988    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51989
51990
51991
51992
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    # Execute function body
52044
52045  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52046  REFERENCE_VERSION=4.8
52047
52048  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52049    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52050  fi
52051
52052  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52053    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52054  fi
52055
52056  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52057  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52058
52059  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52060    :
52061
52062            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52063            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52064
52065
52066  else
52067    :
52068
52069  fi
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084    fi
52085    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52086      # Non-zero builds have stricter warnings
52087      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52088    else
52089      if test "x$TOOLCHAIN_TYPE" = xclang; then
52090        # Some versions of llvm do not like -Wundef
52091        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52092      fi
52093    fi
52094  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52095    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52096        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52097  fi
52098
52099  # Additional macosx handling
52100  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52101    # Setting these parameters makes it an error to link to macosx APIs that are
52102    # newer than the given OS version and makes the linked binaries compatible
52103    # even if built on a newer version of the OS.
52104    # The expected format is X.Y.Z
52105    MACOSX_VERSION_MIN=10.7.0
52106
52107
52108    # The macro takes the version with no dots, ex: 1070
52109    # Let the flags variables get resolved in make for easier override on make
52110    # command line.
52111    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)"
52112    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52113  fi
52114
52115  # Setup some hard coded includes
52116  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52117      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52118      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52119      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52120      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52121      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52122      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52123
52124  # The shared libraries are compiled using the picflag.
52125  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52126      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52127  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52128      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52129
52130  # Executable flags
52131  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52132  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52133
52134
52135
52136
52137
52138
52139  # Setup LDFLAGS et al.
52140  #
52141
52142  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52143    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52144    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52145    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52146    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52147      LDFLAGS_SAFESH="-safeseh"
52148      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52149      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52150      # NOTE: Old build added -machine. Probably not needed.
52151      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52152    else
52153      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52154    fi
52155  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52156      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52157      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52158        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52159        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52160    fi
52161  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52162    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52163    # We have previously set HAS_GNU_HASH if this is the case
52164    if test -n "$HAS_GNU_HASH"; then
52165      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52166      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52167      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52168    fi
52169      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52170        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52171    fi
52172    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52173      # And since we now know that the linker is gnu, then add -z defs, to forbid
52174      # undefined symbols in object files.
52175      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52176      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52177      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52178      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52179      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52180      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52181        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52182      fi
52183      case $DEBUG_LEVEL in
52184        release )
52185          # tell linker to optimize libraries.
52186          # Should this be supplied to the OSS linker as well?
52187          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52188          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52189          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52190          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52191            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52192          fi
52193          ;;
52194        slowdebug )
52195          # Hotspot always let the linker optimize
52196          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52197          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52198            # do relocations at load
52199            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52200            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52201            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52202          fi
52203          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52204            # mark relocations read only
52205            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52206            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52207            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52208          fi
52209          ;;
52210        fastdebug )
52211          # Hotspot always let the linker optimize
52212          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52213          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52214            # mark relocations read only
52215            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52216            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52217            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52218          fi
52219          ;;
52220        * )
52221          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52222          ;;
52223        esac
52224    fi
52225  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52226    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52227    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52228    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52229    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52230    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52231    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52232      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52233    fi
52234  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52235    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52236    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52237    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52238  fi
52239
52240  # Customize LDFLAGS for executables
52241
52242  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52243
52244  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52245    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52246      LDFLAGS_STACK_SIZE=1048576
52247    else
52248      LDFLAGS_STACK_SIZE=327680
52249    fi
52250    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52251  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52252    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52253  fi
52254
52255  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52256
52257  # Customize LDFLAGS for libs
52258  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52259
52260  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52261  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52262    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52263        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52264    OPENJDK_BUILD_JDKLIB_LIBS=""
52265  else
52266    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52267        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52268
52269    if test "xBUILD" = "xTARGET"; then
52270      # On some platforms (mac) the linker warns about non existing -L dirs.
52271      # For any of the variants server, client or minimal, the dir matches the
52272      # variant name. The "main" variant should be used for linking. For the
52273      # rest, the dir is just server.
52274      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52275          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52276        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52277            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52278      else
52279        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52280            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52281      fi
52282    elif test "xBUILD" = "xBUILD"; then
52283      # When building a buildjdk, it's always only the server variant
52284      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52285          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52286    fi
52287
52288    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52289    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52290      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52291    fi
52292
52293  fi
52294
52295OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52296
52297  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52298  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52299    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52300  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52301    # FIXME: This hard-coded path is not really proper.
52302    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52303      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52304    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52305      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52306    fi
52307    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52308        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52309  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52310    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52311  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52312    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52313  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52314    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52315  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52316    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52317        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52318        wsock32.lib winmm.lib version.lib psapi.lib"
52319    fi
52320
52321  # Set OPENJDK_BUILD_JVM_ASFLAGS
52322  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52323    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52324      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52325    fi
52326  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52327    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52328  fi
52329
52330  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346  # Tests are only ever compiled for TARGET
52347  # Flags for compiling test libraries
52348  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52349  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52350
52351  # Flags for compiling test executables
52352  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52353  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52354
52355
52356
52357
52358
52359
52360  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52361  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52362
52363
52364
52365
52366
52367
52368  # Check that the compiler supports -mX (or -qX on AIX) flags
52369  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417    # Execute function body
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466    # Execute function body
52467
52468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52469$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52470  supports=yes
52471
52472  saved_cflags="$CFLAGS"
52473  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52474  ac_ext=c
52475ac_cpp='$CPP $CPPFLAGS'
52476ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52477ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52478ac_compiler_gnu=$ac_cv_c_compiler_gnu
52479
52480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52481/* end confdefs.h.  */
52482int i;
52483_ACEOF
52484if ac_fn_c_try_compile "$LINENO"; then :
52485
52486else
52487  supports=no
52488fi
52489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52490  ac_ext=cpp
52491ac_cpp='$CXXCPP $CPPFLAGS'
52492ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52493ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52494ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52495
52496  CFLAGS="$saved_cflags"
52497
52498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52499$as_echo "$supports" >&6; }
52500  if test "x$supports" = "xyes" ; then
52501    :
52502    C_COMP_SUPPORTS="yes"
52503  else
52504    :
52505    C_COMP_SUPPORTS="no"
52506  fi
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
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566    # Execute function body
52567
52568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52569$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52570  supports=yes
52571
52572  saved_cxxflags="$CXXFLAGS"
52573  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52574  ac_ext=cpp
52575ac_cpp='$CXXCPP $CPPFLAGS'
52576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52579
52580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52581/* end confdefs.h.  */
52582int i;
52583_ACEOF
52584if ac_fn_cxx_try_compile "$LINENO"; then :
52585
52586else
52587  supports=no
52588fi
52589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52590  ac_ext=cpp
52591ac_cpp='$CXXCPP $CPPFLAGS'
52592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52595
52596  CXXFLAGS="$saved_cxxflags"
52597
52598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52599$as_echo "$supports" >&6; }
52600  if test "x$supports" = "xyes" ; then
52601    :
52602    CXX_COMP_SUPPORTS="yes"
52603  else
52604    :
52605    CXX_COMP_SUPPORTS="no"
52606  fi
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52621$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52622  supports=no
52623  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52624
52625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52626$as_echo "$supports" >&6; }
52627  if test "x$supports" = "xyes" ; then
52628    :
52629    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52630  else
52631    :
52632    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52633  fi
52634
52635
52636
52637
52638
52639
52640
52641
52642  # Check whether --enable-warnings-as-errors was given.
52643if test "${enable_warnings_as_errors+set}" = set; then :
52644  enableval=$enable_warnings_as_errors;
52645fi
52646
52647
52648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52649$as_echo_n "checking if native warnings are errors... " >&6; }
52650  if test "x$enable_warnings_as_errors" = "xyes"; then
52651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52652$as_echo "yes (explicitly set)" >&6; }
52653    WARNINGS_AS_ERRORS=true
52654  elif test "x$enable_warnings_as_errors" = "xno"; then
52655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52656$as_echo "no" >&6; }
52657    WARNINGS_AS_ERRORS=false
52658  elif test "x$enable_warnings_as_errors" = "x"; then
52659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52660$as_echo "yes (default)" >&6; }
52661    WARNINGS_AS_ERRORS=true
52662  else
52663    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52664  fi
52665
52666
52667
52668  case "${TOOLCHAIN_TYPE}" in
52669    microsoft)
52670      DISABLE_WARNING_PREFIX="-wd"
52671      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52672      ;;
52673    solstudio)
52674      DISABLE_WARNING_PREFIX="-erroff="
52675      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52676      ;;
52677    gcc)
52678      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52679
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726    # Execute function body
52727
52728
52729
52730
52731
52732
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    # Execute function body
52776
52777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52778$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52779  supports=yes
52780
52781  saved_cflags="$CFLAGS"
52782  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52783  ac_ext=c
52784ac_cpp='$CPP $CPPFLAGS'
52785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52787ac_compiler_gnu=$ac_cv_c_compiler_gnu
52788
52789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52790/* end confdefs.h.  */
52791int i;
52792_ACEOF
52793if ac_fn_c_try_compile "$LINENO"; then :
52794
52795else
52796  supports=no
52797fi
52798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52799  ac_ext=cpp
52800ac_cpp='$CXXCPP $CPPFLAGS'
52801ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52802ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52803ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52804
52805  CFLAGS="$saved_cflags"
52806
52807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52808$as_echo "$supports" >&6; }
52809  if test "x$supports" = "xyes" ; then
52810    :
52811    C_COMP_SUPPORTS="yes"
52812  else
52813    :
52814    C_COMP_SUPPORTS="no"
52815  fi
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875    # Execute function body
52876
52877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52878$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52879  supports=yes
52880
52881  saved_cxxflags="$CXXFLAGS"
52882  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52883  ac_ext=cpp
52884ac_cpp='$CXXCPP $CPPFLAGS'
52885ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52886ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52887ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52888
52889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52890/* end confdefs.h.  */
52891int i;
52892_ACEOF
52893if ac_fn_cxx_try_compile "$LINENO"; then :
52894
52895else
52896  supports=no
52897fi
52898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52899  ac_ext=cpp
52900ac_cpp='$CXXCPP $CPPFLAGS'
52901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52904
52905  CXXFLAGS="$saved_cxxflags"
52906
52907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52908$as_echo "$supports" >&6; }
52909  if test "x$supports" = "xyes" ; then
52910    :
52911    CXX_COMP_SUPPORTS="yes"
52912  else
52913    :
52914    CXX_COMP_SUPPORTS="no"
52915  fi
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52930$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52931  supports=no
52932  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52933
52934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52935$as_echo "$supports" >&6; }
52936  if test "x$supports" = "xyes" ; then
52937    :
52938    GCC_CAN_DISABLE_WARNINGS=true
52939  else
52940    :
52941    GCC_CAN_DISABLE_WARNINGS=false
52942
52943  fi
52944
52945
52946
52947
52948
52949
52950      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52951        DISABLE_WARNING_PREFIX="-Wno-"
52952      else
52953        DISABLE_WARNING_PREFIX=
52954      fi
52955      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52956      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52957      # CFLAGS since any target specific flags will likely not work with the
52958      # build compiler
52959      CC_OLD="$CC"
52960      CXX_OLD="$CXX"
52961      CC="$BUILD_CC"
52962      CXX="$BUILD_CXX"
52963      CFLAGS_OLD="$CFLAGS"
52964      CFLAGS=""
52965
52966
52967
52968
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012    # Execute function body
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061    # Execute function body
53062
53063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53064$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53065  supports=yes
53066
53067  saved_cflags="$CFLAGS"
53068  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53069  ac_ext=c
53070ac_cpp='$CPP $CPPFLAGS'
53071ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53072ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53073ac_compiler_gnu=$ac_cv_c_compiler_gnu
53074
53075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53076/* end confdefs.h.  */
53077int i;
53078_ACEOF
53079if ac_fn_c_try_compile "$LINENO"; then :
53080
53081else
53082  supports=no
53083fi
53084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53085  ac_ext=cpp
53086ac_cpp='$CXXCPP $CPPFLAGS'
53087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53090
53091  CFLAGS="$saved_cflags"
53092
53093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53094$as_echo "$supports" >&6; }
53095  if test "x$supports" = "xyes" ; then
53096    :
53097    C_COMP_SUPPORTS="yes"
53098  else
53099    :
53100    C_COMP_SUPPORTS="no"
53101  fi
53102
53103
53104
53105
53106
53107
53108
53109
53110
53111
53112
53113
53114
53115
53116
53117
53118
53119
53120
53121
53122
53123
53124
53125
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161    # Execute function body
53162
53163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53164$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53165  supports=yes
53166
53167  saved_cxxflags="$CXXFLAGS"
53168  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53169  ac_ext=cpp
53170ac_cpp='$CXXCPP $CPPFLAGS'
53171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53174
53175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53176/* end confdefs.h.  */
53177int i;
53178_ACEOF
53179if ac_fn_cxx_try_compile "$LINENO"; then :
53180
53181else
53182  supports=no
53183fi
53184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53185  ac_ext=cpp
53186ac_cpp='$CXXCPP $CPPFLAGS'
53187ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53188ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53189ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53190
53191  CXXFLAGS="$saved_cxxflags"
53192
53193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53194$as_echo "$supports" >&6; }
53195  if test "x$supports" = "xyes" ; then
53196    :
53197    CXX_COMP_SUPPORTS="yes"
53198  else
53199    :
53200    CXX_COMP_SUPPORTS="no"
53201  fi
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214
53215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53216$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53217  supports=no
53218  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53219
53220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53221$as_echo "$supports" >&6; }
53222  if test "x$supports" = "xyes" ; then
53223    :
53224    BUILD_CC_CAN_DISABLE_WARNINGS=true
53225  else
53226    :
53227    BUILD_CC_CAN_DISABLE_WARNINGS=false
53228
53229  fi
53230
53231
53232
53233
53234
53235
53236      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53237        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53238      else
53239        BUILD_CC_DISABLE_WARNING_PREFIX=
53240      fi
53241      CC="$CC_OLD"
53242      CXX="$CXX_OLD"
53243      CFLAGS="$CFLAGS_OLD"
53244      ;;
53245    clang)
53246      DISABLE_WARNING_PREFIX="-Wno-"
53247      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53248      ;;
53249    xlc)
53250      DISABLE_WARNING_PREFIX="-qsuppress="
53251      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53252      ;;
53253  esac
53254
53255
53256
53257
53258
53259# Setup debug symbols (need objcopy from the toolchain for that)
53260
53261  #
53262  # NATIVE_DEBUG_SYMBOLS
53263  # This must be done after the toolchain is setup, since we're looking at objcopy.
53264  #
53265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53266$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53267
53268# Check whether --with-native-debug-symbols was given.
53269if test "${with_native_debug_symbols+set}" = set; then :
53270  withval=$with_native_debug_symbols;
53271        if test "x$OPENJDK_TARGET_OS" = xaix; then
53272          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53273            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53274          fi
53275        fi
53276
53277else
53278
53279        if test "x$OPENJDK_TARGET_OS" = xaix; then
53280          # AIX doesn't support 'zipped' so use 'internal' as default
53281          with_native_debug_symbols="internal"
53282        else
53283          if test "x$STATIC_BUILD" = xtrue; then
53284            with_native_debug_symbols="none"
53285          else
53286            with_native_debug_symbols="zipped"
53287          fi
53288        fi
53289
53290fi
53291
53292  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53294$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53295
53296  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53297
53298    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53299      if test "x$OBJCOPY" = x; then
53300        # enabling of enable-debug-symbols and can't find objcopy
53301        # this is an error
53302        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53303      fi
53304    fi
53305
53306    COMPILE_WITH_DEBUG_SYMBOLS=true
53307    COPY_DEBUG_SYMBOLS=true
53308    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53309  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53310    COMPILE_WITH_DEBUG_SYMBOLS=false
53311    COPY_DEBUG_SYMBOLS=false
53312    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53313  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53314    COMPILE_WITH_DEBUG_SYMBOLS=true
53315    COPY_DEBUG_SYMBOLS=false
53316    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53317  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53318
53319    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53320      if test "x$OBJCOPY" = x; then
53321        # enabling of enable-debug-symbols and can't find objcopy
53322        # this is an error
53323        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53324      fi
53325    fi
53326
53327    COMPILE_WITH_DEBUG_SYMBOLS=true
53328    COPY_DEBUG_SYMBOLS=true
53329    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53330  else
53331    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53332  fi
53333
53334  # --enable-debug-symbols is deprecated.
53335  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53336
53337  # Check whether --enable-debug-symbols was given.
53338if test "${enable_debug_symbols+set}" = set; then :
53339  enableval=$enable_debug_symbols;
53340fi
53341
53342  if test "x$enable_debug_symbols" != x; then
53343    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53344$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53345
53346    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53347      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53348$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53349    fi
53350
53351  fi
53352
53353
53354  # --enable-zip-debug-info is deprecated.
53355  # Please use --with-native-debug-symbols=zipped .
53356
53357  # Check whether --enable-zip-debug-info was given.
53358if test "${enable_zip_debug_info+set}" = set; then :
53359  enableval=$enable_zip_debug_info;
53360fi
53361
53362  if test "x$enable_zip_debug_info" != x; then
53363    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53364$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53365
53366    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53367      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53368$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53369    fi
53370
53371  fi
53372
53373
53374
53375
53376
53377
53378
53379  # Check whether --enable-native-coverage was given.
53380if test "${enable_native_coverage+set}" = set; then :
53381  enableval=$enable_native_coverage;
53382fi
53383
53384  GCOV_ENABLED="false"
53385  if test "x$enable_native_coverage" = "xyes"; then
53386    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53387      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53388$as_echo_n "checking if native coverage is enabled... " >&6; }
53389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53390$as_echo "yes" >&6; }
53391      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53392      GCOV_LDFLAGS="-fprofile-arcs"
53393      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53394      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53395      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53396      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53397      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53398      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53399      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53400      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53401      GCOV_ENABLED="true"
53402    else
53403      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53404    fi
53405  elif test "x$enable_native_coverage" = "xno"; then
53406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53407$as_echo_n "checking if native coverage is enabled... " >&6; }
53408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53409$as_echo "no" >&6; }
53410  elif test "x$enable_native_coverage" != "x"; then
53411    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53412  fi
53413
53414
53415
53416
53417# Need toolchain to setup dtrace
53418
53419  # Test for dtrace dependencies
53420  # Check whether --enable-dtrace was given.
53421if test "${enable_dtrace+set}" = set; then :
53422  enableval=$enable_dtrace;
53423fi
53424
53425
53426  DTRACE_DEP_MISSING=false
53427
53428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53429$as_echo_n "checking for dtrace tool... " >&6; }
53430  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53432$as_echo "$DTRACE" >&6; }
53433  else
53434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53435$as_echo "not found, cannot build dtrace" >&6; }
53436    DTRACE_DEP_MISSING=true
53437  fi
53438
53439  for ac_header in sys/sdt.h
53440do :
53441  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53442if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53443  cat >>confdefs.h <<_ACEOF
53444#define HAVE_SYS_SDT_H 1
53445_ACEOF
53446 DTRACE_HEADERS_OK=yes
53447else
53448  DTRACE_HEADERS_OK=no
53449fi
53450
53451done
53452
53453  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53454    DTRACE_DEP_MISSING=true
53455  fi
53456
53457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53458$as_echo_n "checking if dtrace should be built... " >&6; }
53459  if test "x$enable_dtrace" = "xyes"; then
53460    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53462$as_echo "no, missing dependencies" >&6; }
53463
53464  # Print a helpful message on how to acquire the necessary build dependency.
53465  # dtrace is the help tag: freetype, cups, alsa etc
53466  MISSING_DEPENDENCY=dtrace
53467
53468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53469    cygwin_help $MISSING_DEPENDENCY
53470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53471    msys_help $MISSING_DEPENDENCY
53472  else
53473    PKGHANDLER_COMMAND=
53474
53475    case $PKGHANDLER in
53476      apt-get)
53477        apt_help     $MISSING_DEPENDENCY ;;
53478      yum)
53479        yum_help     $MISSING_DEPENDENCY ;;
53480      brew)
53481        brew_help    $MISSING_DEPENDENCY ;;
53482      port)
53483        port_help    $MISSING_DEPENDENCY ;;
53484      pkgutil)
53485        pkgutil_help $MISSING_DEPENDENCY ;;
53486      pkgadd)
53487        pkgadd_help  $MISSING_DEPENDENCY ;;
53488    esac
53489
53490    if test "x$PKGHANDLER_COMMAND" != x; then
53491      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53492    fi
53493  fi
53494
53495      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53496    else
53497      INCLUDE_DTRACE=true
53498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53499$as_echo "yes, forced" >&6; }
53500    fi
53501  elif test "x$enable_dtrace" = "xno"; then
53502    INCLUDE_DTRACE=false
53503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53504$as_echo "no, forced" >&6; }
53505  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53506    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53507      INCLUDE_DTRACE=false
53508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53509$as_echo "no, missing dependencies" >&6; }
53510    else
53511      INCLUDE_DTRACE=true
53512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53513$as_echo "yes, dependencies present" >&6; }
53514    fi
53515  else
53516    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53517  fi
53518
53519
53520  # Check whether --enable-aot was given.
53521if test "${enable_aot+set}" = set; then :
53522  enableval=$enable_aot;
53523fi
53524
53525
53526  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53527    ENABLE_AOT="true"
53528  elif test "x$enable_aot" = "xyes"; then
53529    ENABLE_AOT="true"
53530  elif test "x$enable_aot" = "xno"; then
53531    ENABLE_AOT="false"
53532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53533$as_echo_n "checking if aot should be enabled... " >&6; }
53534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53535$as_echo "no, forced" >&6; }
53536  else
53537    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53538  fi
53539
53540  if test "x$ENABLE_AOT" = "xtrue"; then
53541    # Only enable AOT on linux-X64.
53542    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53543      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53544        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53545          ENABLE_AOT="true"
53546        else
53547          ENABLE_AOT="false"
53548          if test "x$enable_aot" = "xyes"; then
53549            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53550          fi
53551        fi
53552      else
53553        ENABLE_AOT="false"
53554        if test "x$enable_aot" = "xyes"; then
53555          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53556        fi
53557      fi
53558    else
53559      ENABLE_AOT="false"
53560      if test "x$enable_aot" = "xyes"; then
53561        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53562      fi
53563    fi
53564  fi
53565
53566
53567
53568
53569  # Check whether --enable-hotspot-gtest was given.
53570if test "${enable_hotspot_gtest+set}" = set; then :
53571  enableval=$enable_hotspot_gtest;
53572fi
53573
53574
53575  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53576    GTEST_DIR_EXISTS="true"
53577  else
53578    GTEST_DIR_EXISTS="false"
53579  fi
53580
53581  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53582$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53583  if test "x$enable_hotspot_gtest" = "xyes"; then
53584    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53586$as_echo "yes, forced" >&6; }
53587      BUILD_GTEST="true"
53588    else
53589      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53590    fi
53591  elif test "x$enable_hotspot_gtest" = "xno"; then
53592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53593$as_echo "no, forced" >&6; }
53594    BUILD_GTEST="false"
53595  elif test "x$enable_hotspot_gtest" = "x"; then
53596    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53598$as_echo "yes" >&6; }
53599      BUILD_GTEST="true"
53600    else
53601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53602$as_echo "no" >&6; }
53603      BUILD_GTEST="false"
53604    fi
53605  else
53606    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53607  fi
53608
53609
53610
53611
53612###############################################################################
53613#
53614# Check dependencies for external and internal libraries.
53615#
53616###############################################################################
53617
53618# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53619
53620  # When using cygwin or msys, we need a wrapper binary that renames
53621  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53622  # @files and rewrites these too! This wrapper binary is
53623  # called fixpath.
53624  FIXPATH=
53625  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53627$as_echo_n "checking if fixpath can be created... " >&6; }
53628    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53629    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53630    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53631    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53632      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53633      FIXPATH="$FIXPATH_BIN -c"
53634    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53635      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53636      # @ was chosen as separator to minimize risk of other tools messing around with it
53637      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53638          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53639      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53640      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53641    fi
53642    FIXPATH_SRC_W="$FIXPATH_SRC"
53643    FIXPATH_BIN_W="$FIXPATH_BIN"
53644
53645  unix_path="$FIXPATH_SRC_W"
53646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53647    windows_path=`$CYGPATH -m "$unix_path"`
53648    FIXPATH_SRC_W="$windows_path"
53649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53650    windows_path=`cmd //c echo $unix_path`
53651    FIXPATH_SRC_W="$windows_path"
53652  fi
53653
53654
53655  unix_path="$FIXPATH_BIN_W"
53656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53657    windows_path=`$CYGPATH -m "$unix_path"`
53658    FIXPATH_BIN_W="$windows_path"
53659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53660    windows_path=`cmd //c echo $unix_path`
53661    FIXPATH_BIN_W="$windows_path"
53662  fi
53663
53664    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53665    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53666    cd $FIXPATH_DIR
53667    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53668    cd $CURDIR
53669
53670    if test ! -x $FIXPATH_BIN; then
53671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53672$as_echo "no" >&6; }
53673      cat $FIXPATH_DIR/fixpath1.log
53674      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53675    fi
53676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53677$as_echo "yes" >&6; }
53678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53679$as_echo_n "checking if fixpath.exe works... " >&6; }
53680    cd $FIXPATH_DIR
53681    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53682        > $FIXPATH_DIR/fixpath2.log 2>&1
53683    cd $CURDIR
53684    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53686$as_echo "no" >&6; }
53687      cat $FIXPATH_DIR/fixpath2.log
53688      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53689    fi
53690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53691$as_echo "yes" >&6; }
53692
53693    FIXPATH_DETACH_FLAG="--detach"
53694  fi
53695
53696
53697
53698
53699
53700
53701  # Check if X11 is needed
53702  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53703    # No X11 support on windows or macosx
53704    NEEDS_LIB_X11=false
53705  else
53706    # All other instances need X11, even if building headless only, libawt still
53707    # needs X11 headers.
53708    NEEDS_LIB_X11=true
53709  fi
53710
53711  # Check if cups is needed
53712  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53713    # Windows have a separate print system
53714    NEEDS_LIB_CUPS=false
53715  else
53716    NEEDS_LIB_CUPS=true
53717  fi
53718
53719  # A custom hook may have set this already
53720  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53721    NEEDS_LIB_FREETYPE=true
53722  fi
53723
53724  # Check if alsa is needed
53725  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53726    NEEDS_LIB_ALSA=true
53727  else
53728    NEEDS_LIB_ALSA=false
53729  fi
53730
53731  # Check if ffi is needed
53732  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53733    NEEDS_LIB_FFI=true
53734  else
53735    NEEDS_LIB_FFI=false
53736  fi
53737
53738
53739  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53740  # dynamic build is configured on command line.
53741
53742# Check whether --with-stdc++lib was given.
53743if test "${with_stdc__lib+set}" = set; then :
53744  withval=$with_stdc__lib;
53745        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53746                && test "x$with_stdc__lib" != xdefault; then
53747          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53748        fi
53749
53750else
53751  with_stdc__lib=default
53752
53753fi
53754
53755
53756  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53757    # Test if stdc++ can be linked statically.
53758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53759$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53760    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53761    ac_ext=cpp
53762ac_cpp='$CXXCPP $CPPFLAGS'
53763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53766
53767    OLD_LIBS="$LIBS"
53768    LIBS="$STATIC_STDCXX_FLAGS"
53769    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53770/* end confdefs.h.  */
53771
53772int
53773main ()
53774{
53775return 0;
53776  ;
53777  return 0;
53778}
53779_ACEOF
53780if ac_fn_cxx_try_link "$LINENO"; then :
53781  has_static_libstdcxx=yes
53782else
53783  has_static_libstdcxx=no
53784fi
53785rm -f core conftest.err conftest.$ac_objext \
53786    conftest$ac_exeext conftest.$ac_ext
53787    LIBS="$OLD_LIBS"
53788    ac_ext=cpp
53789ac_cpp='$CXXCPP $CPPFLAGS'
53790ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53791ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53792ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53793
53794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53795$as_echo "$has_static_libstdcxx" >&6; }
53796
53797    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53798      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53799    fi
53800
53801    # If dynamic was requested, it's available since it would fail above otherwise.
53802    # If dynamic wasn't requested, go with static unless it isn't available.
53803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53804$as_echo_n "checking how to link with libstdc++... " >&6; }
53805    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53806        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53808$as_echo "dynamic" >&6; }
53809    else
53810      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53811      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53812      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53813      # just use the same setting as for the TARGET toolchain.
53814      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53816$as_echo "static" >&6; }
53817    fi
53818  fi
53819
53820  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53821  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53822    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53823  fi
53824
53825
53826
53827  # Setup Windows runtime dlls
53828  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53829
53830
53831# Check whether --with-msvcr-dll was given.
53832if test "${with_msvcr_dll+set}" = set; then :
53833  withval=$with_msvcr_dll;
53834fi
53835
53836
53837  if test "x$with_msvcr_dll" != x; then
53838    # If given explicitly by user, do not probe. If not present, fail directly.
53839
53840  DLL_NAME="$MSVCR_NAME"
53841  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53842  METHOD="--with-msvcr-dll"
53843  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53844    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53845$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53846
53847    # Need to check if the found msvcr is correct architecture
53848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53849$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53850    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53852      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53853      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53854      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53855        CORRECT_MSVCR_ARCH="PE32 executable"
53856      else
53857        CORRECT_MSVCR_ARCH="PE32+ executable"
53858      fi
53859    else
53860      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53861        CORRECT_MSVCR_ARCH=386
53862      else
53863        CORRECT_MSVCR_ARCH=x86-64
53864      fi
53865    fi
53866    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53868$as_echo "ok" >&6; }
53869      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53870
53871  # Only process if variable expands to non-empty
53872
53873  if test "x$MSVC_DLL" != x; then
53874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53875
53876  # Input might be given as Windows format, start by converting to
53877  # unix format.
53878  path="$MSVC_DLL"
53879  new_path=`$CYGPATH -u "$path"`
53880
53881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53884  # "foo.exe" is OK but "foo" is an error.
53885  #
53886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53887  # It is also a way to make sure we got the proper file name for the real test later on.
53888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53889  if test "x$test_shortpath" = x; then
53890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53891$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53892    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53893  fi
53894
53895  # Call helper function which possibly converts this using DOS-style short mode.
53896  # If so, the updated path is stored in $new_path.
53897
53898  input_path="$new_path"
53899  # Check if we need to convert this using DOS-style short mode. If the path
53900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53901  # take no chances and rewrite it.
53902  # Note: m4 eats our [], so we need to use [ and ] instead.
53903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53904  if test "x$has_forbidden_chars" != x; then
53905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53909      # Going to short mode and back again did indeed matter. Since short mode is
53910      # case insensitive, let's make it lowercase to improve readability.
53911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53912      # Now convert it back to Unix-style (cygpath)
53913      input_path=`$CYGPATH -u "$shortmode_path"`
53914      new_path="$input_path"
53915    fi
53916  fi
53917
53918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53919  if test "x$test_cygdrive_prefix" = x; then
53920    # As a simple fix, exclude /usr/bin since it's not a real path.
53921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53923      # a path prefixed by /cygdrive for fixpath to work.
53924      new_path="$CYGWIN_ROOT_PATH$input_path"
53925    fi
53926  fi
53927
53928
53929  if test "x$path" != "x$new_path"; then
53930    MSVC_DLL="$new_path"
53931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53932$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53933  fi
53934
53935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53936
53937  path="$MSVC_DLL"
53938  has_colon=`$ECHO $path | $GREP ^.:`
53939  new_path="$path"
53940  if test "x$has_colon" = x; then
53941    # Not in mixed or Windows style, start by that.
53942    new_path=`cmd //c echo $path`
53943  fi
53944
53945
53946  input_path="$new_path"
53947  # Check if we need to convert this using DOS-style short mode. If the path
53948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53949  # take no chances and rewrite it.
53950  # Note: m4 eats our [], so we need to use [ and ] instead.
53951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53952  if test "x$has_forbidden_chars" != x; then
53953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53955  fi
53956
53957
53958  windows_path="$new_path"
53959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53960    unix_path=`$CYGPATH -u "$windows_path"`
53961    new_path="$unix_path"
53962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53964    new_path="$unix_path"
53965  fi
53966
53967  if test "x$path" != "x$new_path"; then
53968    MSVC_DLL="$new_path"
53969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53970$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53971  fi
53972
53973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53975
53976    else
53977      # We're on a unix platform. Hooray! :)
53978      path="$MSVC_DLL"
53979      has_space=`$ECHO "$path" | $GREP " "`
53980      if test "x$has_space" != x; then
53981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53982$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53984      fi
53985
53986      # Use eval to expand a potential ~
53987      eval path="$path"
53988      if test ! -f "$path" && test ! -d "$path"; then
53989        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53990      fi
53991
53992      if test -d "$path"; then
53993        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53994      else
53995        dir="`$DIRNAME "$path"`"
53996        base="`$BASENAME "$path"`"
53997        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53998      fi
53999    fi
54000  fi
54001
54002      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54003$as_echo_n "checking for $DLL_NAME... " >&6; }
54004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54005$as_echo "$MSVC_DLL" >&6; }
54006    else
54007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54008$as_echo "incorrect, ignoring" >&6; }
54009      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54010$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54011    fi
54012  fi
54013
54014    if test "x$MSVC_DLL" = x; then
54015      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54016    fi
54017    MSVCR_DLL="$MSVC_DLL"
54018  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54019
54020  DLL_NAME="$MSVCR_NAME"
54021  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54022  METHOD="devkit"
54023  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54024    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54025$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54026
54027    # Need to check if the found msvcr is correct architecture
54028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54029$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54030    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54032      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54033      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54034      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54035        CORRECT_MSVCR_ARCH="PE32 executable"
54036      else
54037        CORRECT_MSVCR_ARCH="PE32+ executable"
54038      fi
54039    else
54040      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54041        CORRECT_MSVCR_ARCH=386
54042      else
54043        CORRECT_MSVCR_ARCH=x86-64
54044      fi
54045    fi
54046    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54048$as_echo "ok" >&6; }
54049      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54050
54051  # Only process if variable expands to non-empty
54052
54053  if test "x$MSVC_DLL" != x; then
54054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54055
54056  # Input might be given as Windows format, start by converting to
54057  # unix format.
54058  path="$MSVC_DLL"
54059  new_path=`$CYGPATH -u "$path"`
54060
54061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54064  # "foo.exe" is OK but "foo" is an error.
54065  #
54066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54067  # It is also a way to make sure we got the proper file name for the real test later on.
54068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54069  if test "x$test_shortpath" = x; then
54070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54071$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54072    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54073  fi
54074
54075  # Call helper function which possibly converts this using DOS-style short mode.
54076  # If so, the updated path is stored in $new_path.
54077
54078  input_path="$new_path"
54079  # Check if we need to convert this using DOS-style short mode. If the path
54080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54081  # take no chances and rewrite it.
54082  # Note: m4 eats our [], so we need to use [ and ] instead.
54083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54084  if test "x$has_forbidden_chars" != x; then
54085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54089      # Going to short mode and back again did indeed matter. Since short mode is
54090      # case insensitive, let's make it lowercase to improve readability.
54091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54092      # Now convert it back to Unix-style (cygpath)
54093      input_path=`$CYGPATH -u "$shortmode_path"`
54094      new_path="$input_path"
54095    fi
54096  fi
54097
54098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54099  if test "x$test_cygdrive_prefix" = x; then
54100    # As a simple fix, exclude /usr/bin since it's not a real path.
54101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54103      # a path prefixed by /cygdrive for fixpath to work.
54104      new_path="$CYGWIN_ROOT_PATH$input_path"
54105    fi
54106  fi
54107
54108
54109  if test "x$path" != "x$new_path"; then
54110    MSVC_DLL="$new_path"
54111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54112$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54113  fi
54114
54115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54116
54117  path="$MSVC_DLL"
54118  has_colon=`$ECHO $path | $GREP ^.:`
54119  new_path="$path"
54120  if test "x$has_colon" = x; then
54121    # Not in mixed or Windows style, start by that.
54122    new_path=`cmd //c echo $path`
54123  fi
54124
54125
54126  input_path="$new_path"
54127  # Check if we need to convert this using DOS-style short mode. If the path
54128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54129  # take no chances and rewrite it.
54130  # Note: m4 eats our [], so we need to use [ and ] instead.
54131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54132  if test "x$has_forbidden_chars" != x; then
54133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54135  fi
54136
54137
54138  windows_path="$new_path"
54139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54140    unix_path=`$CYGPATH -u "$windows_path"`
54141    new_path="$unix_path"
54142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54144    new_path="$unix_path"
54145  fi
54146
54147  if test "x$path" != "x$new_path"; then
54148    MSVC_DLL="$new_path"
54149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54150$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54151  fi
54152
54153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54155
54156    else
54157      # We're on a unix platform. Hooray! :)
54158      path="$MSVC_DLL"
54159      has_space=`$ECHO "$path" | $GREP " "`
54160      if test "x$has_space" != x; then
54161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54162$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54163        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54164      fi
54165
54166      # Use eval to expand a potential ~
54167      eval path="$path"
54168      if test ! -f "$path" && test ! -d "$path"; then
54169        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54170      fi
54171
54172      if test -d "$path"; then
54173        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54174      else
54175        dir="`$DIRNAME "$path"`"
54176        base="`$BASENAME "$path"`"
54177        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54178      fi
54179    fi
54180  fi
54181
54182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54183$as_echo_n "checking for $DLL_NAME... " >&6; }
54184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54185$as_echo "$MSVC_DLL" >&6; }
54186    else
54187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54188$as_echo "incorrect, ignoring" >&6; }
54189      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54190$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54191    fi
54192  fi
54193
54194    if test "x$MSVC_DLL" = x; then
54195      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54196    fi
54197    MSVCR_DLL="$MSVC_DLL"
54198  else
54199
54200  DLL_NAME="${MSVCR_NAME}"
54201  MSVC_DLL=
54202
54203  if test "x$MSVC_DLL" = x; then
54204    # Probe: Using well-known location from Visual Studio 10.0
54205    if test "x$VCINSTALLDIR" != x; then
54206      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54207
54208  windows_path="$CYGWIN_VC_INSTALL_DIR"
54209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54210    unix_path=`$CYGPATH -u "$windows_path"`
54211    CYGWIN_VC_INSTALL_DIR="$unix_path"
54212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54214    CYGWIN_VC_INSTALL_DIR="$unix_path"
54215  fi
54216
54217      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54218        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54219      else
54220        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54221      fi
54222      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54223
54224  DLL_NAME="$DLL_NAME"
54225  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54226  METHOD="well-known location in VCINSTALLDIR"
54227  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54229$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54230
54231    # Need to check if the found msvcr is correct architecture
54232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54233$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54234    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54236      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54237      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54238      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54239        CORRECT_MSVCR_ARCH="PE32 executable"
54240      else
54241        CORRECT_MSVCR_ARCH="PE32+ executable"
54242      fi
54243    else
54244      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54245        CORRECT_MSVCR_ARCH=386
54246      else
54247        CORRECT_MSVCR_ARCH=x86-64
54248      fi
54249    fi
54250    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54252$as_echo "ok" >&6; }
54253      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54254
54255  # Only process if variable expands to non-empty
54256
54257  if test "x$MSVC_DLL" != x; then
54258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54259
54260  # Input might be given as Windows format, start by converting to
54261  # unix format.
54262  path="$MSVC_DLL"
54263  new_path=`$CYGPATH -u "$path"`
54264
54265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54268  # "foo.exe" is OK but "foo" is an error.
54269  #
54270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54271  # It is also a way to make sure we got the proper file name for the real test later on.
54272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54273  if test "x$test_shortpath" = x; then
54274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54275$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54276    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54277  fi
54278
54279  # Call helper function which possibly converts this using DOS-style short mode.
54280  # If so, the updated path is stored in $new_path.
54281
54282  input_path="$new_path"
54283  # Check if we need to convert this using DOS-style short mode. If the path
54284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54285  # take no chances and rewrite it.
54286  # Note: m4 eats our [], so we need to use [ and ] instead.
54287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54288  if test "x$has_forbidden_chars" != x; then
54289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54293      # Going to short mode and back again did indeed matter. Since short mode is
54294      # case insensitive, let's make it lowercase to improve readability.
54295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54296      # Now convert it back to Unix-style (cygpath)
54297      input_path=`$CYGPATH -u "$shortmode_path"`
54298      new_path="$input_path"
54299    fi
54300  fi
54301
54302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54303  if test "x$test_cygdrive_prefix" = x; then
54304    # As a simple fix, exclude /usr/bin since it's not a real path.
54305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54307      # a path prefixed by /cygdrive for fixpath to work.
54308      new_path="$CYGWIN_ROOT_PATH$input_path"
54309    fi
54310  fi
54311
54312
54313  if test "x$path" != "x$new_path"; then
54314    MSVC_DLL="$new_path"
54315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54316$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54317  fi
54318
54319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54320
54321  path="$MSVC_DLL"
54322  has_colon=`$ECHO $path | $GREP ^.:`
54323  new_path="$path"
54324  if test "x$has_colon" = x; then
54325    # Not in mixed or Windows style, start by that.
54326    new_path=`cmd //c echo $path`
54327  fi
54328
54329
54330  input_path="$new_path"
54331  # Check if we need to convert this using DOS-style short mode. If the path
54332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54333  # take no chances and rewrite it.
54334  # Note: m4 eats our [], so we need to use [ and ] instead.
54335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54336  if test "x$has_forbidden_chars" != x; then
54337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54339  fi
54340
54341
54342  windows_path="$new_path"
54343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54344    unix_path=`$CYGPATH -u "$windows_path"`
54345    new_path="$unix_path"
54346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54348    new_path="$unix_path"
54349  fi
54350
54351  if test "x$path" != "x$new_path"; then
54352    MSVC_DLL="$new_path"
54353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54354$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54355  fi
54356
54357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54359
54360    else
54361      # We're on a unix platform. Hooray! :)
54362      path="$MSVC_DLL"
54363      has_space=`$ECHO "$path" | $GREP " "`
54364      if test "x$has_space" != x; then
54365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54366$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54368      fi
54369
54370      # Use eval to expand a potential ~
54371      eval path="$path"
54372      if test ! -f "$path" && test ! -d "$path"; then
54373        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54374      fi
54375
54376      if test -d "$path"; then
54377        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54378      else
54379        dir="`$DIRNAME "$path"`"
54380        base="`$BASENAME "$path"`"
54381        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54382      fi
54383    fi
54384  fi
54385
54386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54387$as_echo_n "checking for $DLL_NAME... " >&6; }
54388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54389$as_echo "$MSVC_DLL" >&6; }
54390    else
54391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54392$as_echo "incorrect, ignoring" >&6; }
54393      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54394$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54395    fi
54396  fi
54397
54398    fi
54399  fi
54400
54401  if test "x$MSVC_DLL" = x; then
54402    # Probe: Check in the Boot JDK directory.
54403    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54404
54405  DLL_NAME="$DLL_NAME"
54406  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54407  METHOD="well-known location in Boot JDK"
54408  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54409    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54410$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54411
54412    # Need to check if the found msvcr is correct architecture
54413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54414$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54415    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54417      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54418      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54419      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54420        CORRECT_MSVCR_ARCH="PE32 executable"
54421      else
54422        CORRECT_MSVCR_ARCH="PE32+ executable"
54423      fi
54424    else
54425      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54426        CORRECT_MSVCR_ARCH=386
54427      else
54428        CORRECT_MSVCR_ARCH=x86-64
54429      fi
54430    fi
54431    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54433$as_echo "ok" >&6; }
54434      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54435
54436  # Only process if variable expands to non-empty
54437
54438  if test "x$MSVC_DLL" != x; then
54439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54440
54441  # Input might be given as Windows format, start by converting to
54442  # unix format.
54443  path="$MSVC_DLL"
54444  new_path=`$CYGPATH -u "$path"`
54445
54446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54449  # "foo.exe" is OK but "foo" is an error.
54450  #
54451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54452  # It is also a way to make sure we got the proper file name for the real test later on.
54453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54454  if test "x$test_shortpath" = x; then
54455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54456$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54457    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54458  fi
54459
54460  # Call helper function which possibly converts this using DOS-style short mode.
54461  # If so, the updated path is stored in $new_path.
54462
54463  input_path="$new_path"
54464  # Check if we need to convert this using DOS-style short mode. If the path
54465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54466  # take no chances and rewrite it.
54467  # Note: m4 eats our [], so we need to use [ and ] instead.
54468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54469  if test "x$has_forbidden_chars" != x; then
54470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54474      # Going to short mode and back again did indeed matter. Since short mode is
54475      # case insensitive, let's make it lowercase to improve readability.
54476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54477      # Now convert it back to Unix-style (cygpath)
54478      input_path=`$CYGPATH -u "$shortmode_path"`
54479      new_path="$input_path"
54480    fi
54481  fi
54482
54483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54484  if test "x$test_cygdrive_prefix" = x; then
54485    # As a simple fix, exclude /usr/bin since it's not a real path.
54486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54488      # a path prefixed by /cygdrive for fixpath to work.
54489      new_path="$CYGWIN_ROOT_PATH$input_path"
54490    fi
54491  fi
54492
54493
54494  if test "x$path" != "x$new_path"; then
54495    MSVC_DLL="$new_path"
54496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54497$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54498  fi
54499
54500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54501
54502  path="$MSVC_DLL"
54503  has_colon=`$ECHO $path | $GREP ^.:`
54504  new_path="$path"
54505  if test "x$has_colon" = x; then
54506    # Not in mixed or Windows style, start by that.
54507    new_path=`cmd //c echo $path`
54508  fi
54509
54510
54511  input_path="$new_path"
54512  # Check if we need to convert this using DOS-style short mode. If the path
54513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54514  # take no chances and rewrite it.
54515  # Note: m4 eats our [], so we need to use [ and ] instead.
54516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54517  if test "x$has_forbidden_chars" != x; then
54518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54520  fi
54521
54522
54523  windows_path="$new_path"
54524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54525    unix_path=`$CYGPATH -u "$windows_path"`
54526    new_path="$unix_path"
54527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54529    new_path="$unix_path"
54530  fi
54531
54532  if test "x$path" != "x$new_path"; then
54533    MSVC_DLL="$new_path"
54534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54535$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54536  fi
54537
54538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54540
54541    else
54542      # We're on a unix platform. Hooray! :)
54543      path="$MSVC_DLL"
54544      has_space=`$ECHO "$path" | $GREP " "`
54545      if test "x$has_space" != x; then
54546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54547$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54549      fi
54550
54551      # Use eval to expand a potential ~
54552      eval path="$path"
54553      if test ! -f "$path" && test ! -d "$path"; then
54554        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54555      fi
54556
54557      if test -d "$path"; then
54558        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54559      else
54560        dir="`$DIRNAME "$path"`"
54561        base="`$BASENAME "$path"`"
54562        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54563      fi
54564    fi
54565  fi
54566
54567      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54568$as_echo_n "checking for $DLL_NAME... " >&6; }
54569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54570$as_echo "$MSVC_DLL" >&6; }
54571    else
54572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54573$as_echo "incorrect, ignoring" >&6; }
54574      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54575$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54576    fi
54577  fi
54578
54579  fi
54580
54581  if test "x$MSVC_DLL" = x; then
54582    # Probe: Look in the Windows system32 directory
54583    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54584
54585  windows_path="$CYGWIN_SYSTEMROOT"
54586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54587    unix_path=`$CYGPATH -u "$windows_path"`
54588    CYGWIN_SYSTEMROOT="$unix_path"
54589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54591    CYGWIN_SYSTEMROOT="$unix_path"
54592  fi
54593
54594    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54595
54596  DLL_NAME="$DLL_NAME"
54597  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54598  METHOD="well-known location in SYSTEMROOT"
54599  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54600    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54601$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54602
54603    # Need to check if the found msvcr is correct architecture
54604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54605$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54606    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54608      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54609      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54610      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54611        CORRECT_MSVCR_ARCH="PE32 executable"
54612      else
54613        CORRECT_MSVCR_ARCH="PE32+ executable"
54614      fi
54615    else
54616      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54617        CORRECT_MSVCR_ARCH=386
54618      else
54619        CORRECT_MSVCR_ARCH=x86-64
54620      fi
54621    fi
54622    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54624$as_echo "ok" >&6; }
54625      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54626
54627  # Only process if variable expands to non-empty
54628
54629  if test "x$MSVC_DLL" != x; then
54630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54631
54632  # Input might be given as Windows format, start by converting to
54633  # unix format.
54634  path="$MSVC_DLL"
54635  new_path=`$CYGPATH -u "$path"`
54636
54637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54640  # "foo.exe" is OK but "foo" is an error.
54641  #
54642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54643  # It is also a way to make sure we got the proper file name for the real test later on.
54644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54645  if test "x$test_shortpath" = x; then
54646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54647$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54648    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54649  fi
54650
54651  # Call helper function which possibly converts this using DOS-style short mode.
54652  # If so, the updated path is stored in $new_path.
54653
54654  input_path="$new_path"
54655  # Check if we need to convert this using DOS-style short mode. If the path
54656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54657  # take no chances and rewrite it.
54658  # Note: m4 eats our [], so we need to use [ and ] instead.
54659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54660  if test "x$has_forbidden_chars" != x; then
54661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54665      # Going to short mode and back again did indeed matter. Since short mode is
54666      # case insensitive, let's make it lowercase to improve readability.
54667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54668      # Now convert it back to Unix-style (cygpath)
54669      input_path=`$CYGPATH -u "$shortmode_path"`
54670      new_path="$input_path"
54671    fi
54672  fi
54673
54674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54675  if test "x$test_cygdrive_prefix" = x; then
54676    # As a simple fix, exclude /usr/bin since it's not a real path.
54677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54679      # a path prefixed by /cygdrive for fixpath to work.
54680      new_path="$CYGWIN_ROOT_PATH$input_path"
54681    fi
54682  fi
54683
54684
54685  if test "x$path" != "x$new_path"; then
54686    MSVC_DLL="$new_path"
54687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54688$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54689  fi
54690
54691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54692
54693  path="$MSVC_DLL"
54694  has_colon=`$ECHO $path | $GREP ^.:`
54695  new_path="$path"
54696  if test "x$has_colon" = x; then
54697    # Not in mixed or Windows style, start by that.
54698    new_path=`cmd //c echo $path`
54699  fi
54700
54701
54702  input_path="$new_path"
54703  # Check if we need to convert this using DOS-style short mode. If the path
54704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54705  # take no chances and rewrite it.
54706  # Note: m4 eats our [], so we need to use [ and ] instead.
54707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54708  if test "x$has_forbidden_chars" != x; then
54709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54711  fi
54712
54713
54714  windows_path="$new_path"
54715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54716    unix_path=`$CYGPATH -u "$windows_path"`
54717    new_path="$unix_path"
54718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54720    new_path="$unix_path"
54721  fi
54722
54723  if test "x$path" != "x$new_path"; then
54724    MSVC_DLL="$new_path"
54725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54726$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54727  fi
54728
54729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54731
54732    else
54733      # We're on a unix platform. Hooray! :)
54734      path="$MSVC_DLL"
54735      has_space=`$ECHO "$path" | $GREP " "`
54736      if test "x$has_space" != x; then
54737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54738$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54740      fi
54741
54742      # Use eval to expand a potential ~
54743      eval path="$path"
54744      if test ! -f "$path" && test ! -d "$path"; then
54745        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54746      fi
54747
54748      if test -d "$path"; then
54749        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54750      else
54751        dir="`$DIRNAME "$path"`"
54752        base="`$BASENAME "$path"`"
54753        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54754      fi
54755    fi
54756  fi
54757
54758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54759$as_echo_n "checking for $DLL_NAME... " >&6; }
54760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54761$as_echo "$MSVC_DLL" >&6; }
54762    else
54763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54764$as_echo "incorrect, ignoring" >&6; }
54765      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54766$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54767    fi
54768  fi
54769
54770  fi
54771
54772  if test "x$MSVC_DLL" = x; then
54773    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54774    if test "x$VS100COMNTOOLS" != x; then
54775      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54776
54777  windows_path="$CYGWIN_VS_TOOLS_DIR"
54778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54779    unix_path=`$CYGPATH -u "$windows_path"`
54780    CYGWIN_VS_TOOLS_DIR="$unix_path"
54781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54783    CYGWIN_VS_TOOLS_DIR="$unix_path"
54784  fi
54785
54786      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54787        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54788	    | $GREP -i /x64/ | $HEAD --lines 1`
54789      else
54790        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54791	    | $GREP -i /x86/ | $HEAD --lines 1`
54792      fi
54793
54794  DLL_NAME="$DLL_NAME"
54795  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54796  METHOD="search of VS100COMNTOOLS"
54797  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54798    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54799$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54800
54801    # Need to check if the found msvcr is correct architecture
54802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54803$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54804    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54806      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54807      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54808      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54809        CORRECT_MSVCR_ARCH="PE32 executable"
54810      else
54811        CORRECT_MSVCR_ARCH="PE32+ executable"
54812      fi
54813    else
54814      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54815        CORRECT_MSVCR_ARCH=386
54816      else
54817        CORRECT_MSVCR_ARCH=x86-64
54818      fi
54819    fi
54820    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54822$as_echo "ok" >&6; }
54823      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54824
54825  # Only process if variable expands to non-empty
54826
54827  if test "x$MSVC_DLL" != x; then
54828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54829
54830  # Input might be given as Windows format, start by converting to
54831  # unix format.
54832  path="$MSVC_DLL"
54833  new_path=`$CYGPATH -u "$path"`
54834
54835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54838  # "foo.exe" is OK but "foo" is an error.
54839  #
54840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54841  # It is also a way to make sure we got the proper file name for the real test later on.
54842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54843  if test "x$test_shortpath" = x; then
54844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54845$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54846    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54847  fi
54848
54849  # Call helper function which possibly converts this using DOS-style short mode.
54850  # If so, the updated path is stored in $new_path.
54851
54852  input_path="$new_path"
54853  # Check if we need to convert this using DOS-style short mode. If the path
54854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54855  # take no chances and rewrite it.
54856  # Note: m4 eats our [], so we need to use [ and ] instead.
54857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54858  if test "x$has_forbidden_chars" != x; then
54859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54863      # Going to short mode and back again did indeed matter. Since short mode is
54864      # case insensitive, let's make it lowercase to improve readability.
54865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54866      # Now convert it back to Unix-style (cygpath)
54867      input_path=`$CYGPATH -u "$shortmode_path"`
54868      new_path="$input_path"
54869    fi
54870  fi
54871
54872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54873  if test "x$test_cygdrive_prefix" = x; then
54874    # As a simple fix, exclude /usr/bin since it's not a real path.
54875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54877      # a path prefixed by /cygdrive for fixpath to work.
54878      new_path="$CYGWIN_ROOT_PATH$input_path"
54879    fi
54880  fi
54881
54882
54883  if test "x$path" != "x$new_path"; then
54884    MSVC_DLL="$new_path"
54885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54886$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54887  fi
54888
54889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54890
54891  path="$MSVC_DLL"
54892  has_colon=`$ECHO $path | $GREP ^.:`
54893  new_path="$path"
54894  if test "x$has_colon" = x; then
54895    # Not in mixed or Windows style, start by that.
54896    new_path=`cmd //c echo $path`
54897  fi
54898
54899
54900  input_path="$new_path"
54901  # Check if we need to convert this using DOS-style short mode. If the path
54902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54903  # take no chances and rewrite it.
54904  # Note: m4 eats our [], so we need to use [ and ] instead.
54905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54906  if test "x$has_forbidden_chars" != x; then
54907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54909  fi
54910
54911
54912  windows_path="$new_path"
54913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54914    unix_path=`$CYGPATH -u "$windows_path"`
54915    new_path="$unix_path"
54916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54918    new_path="$unix_path"
54919  fi
54920
54921  if test "x$path" != "x$new_path"; then
54922    MSVC_DLL="$new_path"
54923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54924$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54925  fi
54926
54927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54929
54930    else
54931      # We're on a unix platform. Hooray! :)
54932      path="$MSVC_DLL"
54933      has_space=`$ECHO "$path" | $GREP " "`
54934      if test "x$has_space" != x; then
54935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54936$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54938      fi
54939
54940      # Use eval to expand a potential ~
54941      eval path="$path"
54942      if test ! -f "$path" && test ! -d "$path"; then
54943        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54944      fi
54945
54946      if test -d "$path"; then
54947        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54948      else
54949        dir="`$DIRNAME "$path"`"
54950        base="`$BASENAME "$path"`"
54951        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54952      fi
54953    fi
54954  fi
54955
54956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54957$as_echo_n "checking for $DLL_NAME... " >&6; }
54958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54959$as_echo "$MSVC_DLL" >&6; }
54960    else
54961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54962$as_echo "incorrect, ignoring" >&6; }
54963      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54964$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54965    fi
54966  fi
54967
54968    fi
54969  fi
54970
54971  if test "x$MSVC_DLL" = x; then
54972    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54973    # (This was the original behaviour; kept since it might turn something up)
54974    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54975      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54976        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54977	    | $GREP x64 | $HEAD --lines 1`
54978      else
54979        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54980	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54981        if test "x$POSSIBLE_MSVC_DLL" = x; then
54982          # We're grasping at straws now...
54983          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54984	      | $HEAD --lines 1`
54985        fi
54986      fi
54987
54988
54989  DLL_NAME="$DLL_NAME"
54990  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54991  METHOD="search of VCINSTALLDIR"
54992  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54993    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54994$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54995
54996    # Need to check if the found msvcr is correct architecture
54997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54998$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54999    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55001      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55002      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55004        CORRECT_MSVCR_ARCH="PE32 executable"
55005      else
55006        CORRECT_MSVCR_ARCH="PE32+ executable"
55007      fi
55008    else
55009      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55010        CORRECT_MSVCR_ARCH=386
55011      else
55012        CORRECT_MSVCR_ARCH=x86-64
55013      fi
55014    fi
55015    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55017$as_echo "ok" >&6; }
55018      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55019
55020  # Only process if variable expands to non-empty
55021
55022  if test "x$MSVC_DLL" != x; then
55023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55024
55025  # Input might be given as Windows format, start by converting to
55026  # unix format.
55027  path="$MSVC_DLL"
55028  new_path=`$CYGPATH -u "$path"`
55029
55030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55033  # "foo.exe" is OK but "foo" is an error.
55034  #
55035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55036  # It is also a way to make sure we got the proper file name for the real test later on.
55037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55038  if test "x$test_shortpath" = x; then
55039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55040$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55041    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55042  fi
55043
55044  # Call helper function which possibly converts this using DOS-style short mode.
55045  # If so, the updated path is stored in $new_path.
55046
55047  input_path="$new_path"
55048  # Check if we need to convert this using DOS-style short mode. If the path
55049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55050  # take no chances and rewrite it.
55051  # Note: m4 eats our [], so we need to use [ and ] instead.
55052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55053  if test "x$has_forbidden_chars" != x; then
55054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55058      # Going to short mode and back again did indeed matter. Since short mode is
55059      # case insensitive, let's make it lowercase to improve readability.
55060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55061      # Now convert it back to Unix-style (cygpath)
55062      input_path=`$CYGPATH -u "$shortmode_path"`
55063      new_path="$input_path"
55064    fi
55065  fi
55066
55067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55068  if test "x$test_cygdrive_prefix" = x; then
55069    # As a simple fix, exclude /usr/bin since it's not a real path.
55070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55072      # a path prefixed by /cygdrive for fixpath to work.
55073      new_path="$CYGWIN_ROOT_PATH$input_path"
55074    fi
55075  fi
55076
55077
55078  if test "x$path" != "x$new_path"; then
55079    MSVC_DLL="$new_path"
55080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55081$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55082  fi
55083
55084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55085
55086  path="$MSVC_DLL"
55087  has_colon=`$ECHO $path | $GREP ^.:`
55088  new_path="$path"
55089  if test "x$has_colon" = x; then
55090    # Not in mixed or Windows style, start by that.
55091    new_path=`cmd //c echo $path`
55092  fi
55093
55094
55095  input_path="$new_path"
55096  # Check if we need to convert this using DOS-style short mode. If the path
55097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55098  # take no chances and rewrite it.
55099  # Note: m4 eats our [], so we need to use [ and ] instead.
55100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55101  if test "x$has_forbidden_chars" != x; then
55102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55104  fi
55105
55106
55107  windows_path="$new_path"
55108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55109    unix_path=`$CYGPATH -u "$windows_path"`
55110    new_path="$unix_path"
55111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55113    new_path="$unix_path"
55114  fi
55115
55116  if test "x$path" != "x$new_path"; then
55117    MSVC_DLL="$new_path"
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55119$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55120  fi
55121
55122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55124
55125    else
55126      # We're on a unix platform. Hooray! :)
55127      path="$MSVC_DLL"
55128      has_space=`$ECHO "$path" | $GREP " "`
55129      if test "x$has_space" != x; then
55130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55131$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55133      fi
55134
55135      # Use eval to expand a potential ~
55136      eval path="$path"
55137      if test ! -f "$path" && test ! -d "$path"; then
55138        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55139      fi
55140
55141      if test -d "$path"; then
55142        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55143      else
55144        dir="`$DIRNAME "$path"`"
55145        base="`$BASENAME "$path"`"
55146        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55147      fi
55148    fi
55149  fi
55150
55151      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55152$as_echo_n "checking for $DLL_NAME... " >&6; }
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55154$as_echo "$MSVC_DLL" >&6; }
55155    else
55156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55157$as_echo "incorrect, ignoring" >&6; }
55158      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55159$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55160    fi
55161  fi
55162
55163    fi
55164  fi
55165
55166  if test "x$MSVC_DLL" = x; then
55167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55168$as_echo_n "checking for $DLL_NAME... " >&6; }
55169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55170$as_echo "no" >&6; }
55171    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55172  fi
55173
55174    MSVCR_DLL="$MSVC_DLL"
55175  fi
55176
55177
55178
55179# Check whether --with-msvcp-dll was given.
55180if test "${with_msvcp_dll+set}" = set; then :
55181  withval=$with_msvcp_dll;
55182fi
55183
55184
55185  if test "x$MSVCP_NAME" != "x"; then
55186    if test "x$with_msvcp_dll" != x; then
55187      # If given explicitly by user, do not probe. If not present, fail directly.
55188
55189  DLL_NAME="$MSVCP_NAME"
55190  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55191  METHOD="--with-msvcp-dll"
55192  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55193    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55194$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55195
55196    # Need to check if the found msvcr is correct architecture
55197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55198$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55199    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55201      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55202      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55203      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55204        CORRECT_MSVCR_ARCH="PE32 executable"
55205      else
55206        CORRECT_MSVCR_ARCH="PE32+ executable"
55207      fi
55208    else
55209      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55210        CORRECT_MSVCR_ARCH=386
55211      else
55212        CORRECT_MSVCR_ARCH=x86-64
55213      fi
55214    fi
55215    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55217$as_echo "ok" >&6; }
55218      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55219
55220  # Only process if variable expands to non-empty
55221
55222  if test "x$MSVC_DLL" != x; then
55223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55224
55225  # Input might be given as Windows format, start by converting to
55226  # unix format.
55227  path="$MSVC_DLL"
55228  new_path=`$CYGPATH -u "$path"`
55229
55230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55233  # "foo.exe" is OK but "foo" is an error.
55234  #
55235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55236  # It is also a way to make sure we got the proper file name for the real test later on.
55237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55238  if test "x$test_shortpath" = x; then
55239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55240$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55241    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55242  fi
55243
55244  # Call helper function which possibly converts this using DOS-style short mode.
55245  # If so, the updated path is stored in $new_path.
55246
55247  input_path="$new_path"
55248  # Check if we need to convert this using DOS-style short mode. If the path
55249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55250  # take no chances and rewrite it.
55251  # Note: m4 eats our [], so we need to use [ and ] instead.
55252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55253  if test "x$has_forbidden_chars" != x; then
55254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55258      # Going to short mode and back again did indeed matter. Since short mode is
55259      # case insensitive, let's make it lowercase to improve readability.
55260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55261      # Now convert it back to Unix-style (cygpath)
55262      input_path=`$CYGPATH -u "$shortmode_path"`
55263      new_path="$input_path"
55264    fi
55265  fi
55266
55267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55268  if test "x$test_cygdrive_prefix" = x; then
55269    # As a simple fix, exclude /usr/bin since it's not a real path.
55270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55272      # a path prefixed by /cygdrive for fixpath to work.
55273      new_path="$CYGWIN_ROOT_PATH$input_path"
55274    fi
55275  fi
55276
55277
55278  if test "x$path" != "x$new_path"; then
55279    MSVC_DLL="$new_path"
55280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55281$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55282  fi
55283
55284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55285
55286  path="$MSVC_DLL"
55287  has_colon=`$ECHO $path | $GREP ^.:`
55288  new_path="$path"
55289  if test "x$has_colon" = x; then
55290    # Not in mixed or Windows style, start by that.
55291    new_path=`cmd //c echo $path`
55292  fi
55293
55294
55295  input_path="$new_path"
55296  # Check if we need to convert this using DOS-style short mode. If the path
55297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55298  # take no chances and rewrite it.
55299  # Note: m4 eats our [], so we need to use [ and ] instead.
55300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55301  if test "x$has_forbidden_chars" != x; then
55302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55304  fi
55305
55306
55307  windows_path="$new_path"
55308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55309    unix_path=`$CYGPATH -u "$windows_path"`
55310    new_path="$unix_path"
55311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55313    new_path="$unix_path"
55314  fi
55315
55316  if test "x$path" != "x$new_path"; then
55317    MSVC_DLL="$new_path"
55318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55319$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55320  fi
55321
55322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55324
55325    else
55326      # We're on a unix platform. Hooray! :)
55327      path="$MSVC_DLL"
55328      has_space=`$ECHO "$path" | $GREP " "`
55329      if test "x$has_space" != x; then
55330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55331$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55333      fi
55334
55335      # Use eval to expand a potential ~
55336      eval path="$path"
55337      if test ! -f "$path" && test ! -d "$path"; then
55338        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55339      fi
55340
55341      if test -d "$path"; then
55342        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55343      else
55344        dir="`$DIRNAME "$path"`"
55345        base="`$BASENAME "$path"`"
55346        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55347      fi
55348    fi
55349  fi
55350
55351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55352$as_echo_n "checking for $DLL_NAME... " >&6; }
55353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55354$as_echo "$MSVC_DLL" >&6; }
55355    else
55356      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55357$as_echo "incorrect, ignoring" >&6; }
55358      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55359$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55360    fi
55361  fi
55362
55363      if test "x$MSVC_DLL" = x; then
55364        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55365      fi
55366      MSVCP_DLL="$MSVC_DLL"
55367    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55368
55369  DLL_NAME="$MSVCP_NAME"
55370  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55371  METHOD="devkit"
55372  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55373    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55374$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55375
55376    # Need to check if the found msvcr is correct architecture
55377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55378$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55379    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55381      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55382      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55383      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55384        CORRECT_MSVCR_ARCH="PE32 executable"
55385      else
55386        CORRECT_MSVCR_ARCH="PE32+ executable"
55387      fi
55388    else
55389      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55390        CORRECT_MSVCR_ARCH=386
55391      else
55392        CORRECT_MSVCR_ARCH=x86-64
55393      fi
55394    fi
55395    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55397$as_echo "ok" >&6; }
55398      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55399
55400  # Only process if variable expands to non-empty
55401
55402  if test "x$MSVC_DLL" != x; then
55403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55404
55405  # Input might be given as Windows format, start by converting to
55406  # unix format.
55407  path="$MSVC_DLL"
55408  new_path=`$CYGPATH -u "$path"`
55409
55410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55413  # "foo.exe" is OK but "foo" is an error.
55414  #
55415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55416  # It is also a way to make sure we got the proper file name for the real test later on.
55417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55418  if test "x$test_shortpath" = x; then
55419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55420$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55421    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55422  fi
55423
55424  # Call helper function which possibly converts this using DOS-style short mode.
55425  # If so, the updated path is stored in $new_path.
55426
55427  input_path="$new_path"
55428  # Check if we need to convert this using DOS-style short mode. If the path
55429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55430  # take no chances and rewrite it.
55431  # Note: m4 eats our [], so we need to use [ and ] instead.
55432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55433  if test "x$has_forbidden_chars" != x; then
55434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55438      # Going to short mode and back again did indeed matter. Since short mode is
55439      # case insensitive, let's make it lowercase to improve readability.
55440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55441      # Now convert it back to Unix-style (cygpath)
55442      input_path=`$CYGPATH -u "$shortmode_path"`
55443      new_path="$input_path"
55444    fi
55445  fi
55446
55447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55448  if test "x$test_cygdrive_prefix" = x; then
55449    # As a simple fix, exclude /usr/bin since it's not a real path.
55450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55452      # a path prefixed by /cygdrive for fixpath to work.
55453      new_path="$CYGWIN_ROOT_PATH$input_path"
55454    fi
55455  fi
55456
55457
55458  if test "x$path" != "x$new_path"; then
55459    MSVC_DLL="$new_path"
55460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55461$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55462  fi
55463
55464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55465
55466  path="$MSVC_DLL"
55467  has_colon=`$ECHO $path | $GREP ^.:`
55468  new_path="$path"
55469  if test "x$has_colon" = x; then
55470    # Not in mixed or Windows style, start by that.
55471    new_path=`cmd //c echo $path`
55472  fi
55473
55474
55475  input_path="$new_path"
55476  # Check if we need to convert this using DOS-style short mode. If the path
55477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55478  # take no chances and rewrite it.
55479  # Note: m4 eats our [], so we need to use [ and ] instead.
55480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55481  if test "x$has_forbidden_chars" != x; then
55482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55484  fi
55485
55486
55487  windows_path="$new_path"
55488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55489    unix_path=`$CYGPATH -u "$windows_path"`
55490    new_path="$unix_path"
55491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55493    new_path="$unix_path"
55494  fi
55495
55496  if test "x$path" != "x$new_path"; then
55497    MSVC_DLL="$new_path"
55498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55499$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55500  fi
55501
55502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55504
55505    else
55506      # We're on a unix platform. Hooray! :)
55507      path="$MSVC_DLL"
55508      has_space=`$ECHO "$path" | $GREP " "`
55509      if test "x$has_space" != x; then
55510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55511$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55513      fi
55514
55515      # Use eval to expand a potential ~
55516      eval path="$path"
55517      if test ! -f "$path" && test ! -d "$path"; then
55518        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55519      fi
55520
55521      if test -d "$path"; then
55522        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55523      else
55524        dir="`$DIRNAME "$path"`"
55525        base="`$BASENAME "$path"`"
55526        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55527      fi
55528    fi
55529  fi
55530
55531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55532$as_echo_n "checking for $DLL_NAME... " >&6; }
55533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55534$as_echo "$MSVC_DLL" >&6; }
55535    else
55536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55537$as_echo "incorrect, ignoring" >&6; }
55538      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55539$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55540    fi
55541  fi
55542
55543      if test "x$MSVC_DLL" = x; then
55544        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55545      fi
55546      MSVCP_DLL="$MSVC_DLL"
55547    else
55548
55549  DLL_NAME="${MSVCP_NAME}"
55550  MSVC_DLL=
55551
55552  if test "x$MSVC_DLL" = x; then
55553    # Probe: Using well-known location from Visual Studio 10.0
55554    if test "x$VCINSTALLDIR" != x; then
55555      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55556
55557  windows_path="$CYGWIN_VC_INSTALL_DIR"
55558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55559    unix_path=`$CYGPATH -u "$windows_path"`
55560    CYGWIN_VC_INSTALL_DIR="$unix_path"
55561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55563    CYGWIN_VC_INSTALL_DIR="$unix_path"
55564  fi
55565
55566      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55567        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55568      else
55569        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55570      fi
55571      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55572
55573  DLL_NAME="$DLL_NAME"
55574  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55575  METHOD="well-known location in VCINSTALLDIR"
55576  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55577    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55578$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55579
55580    # Need to check if the found msvcr is correct architecture
55581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55582$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55583    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55585      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55586      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55587      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55588        CORRECT_MSVCR_ARCH="PE32 executable"
55589      else
55590        CORRECT_MSVCR_ARCH="PE32+ executable"
55591      fi
55592    else
55593      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55594        CORRECT_MSVCR_ARCH=386
55595      else
55596        CORRECT_MSVCR_ARCH=x86-64
55597      fi
55598    fi
55599    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55601$as_echo "ok" >&6; }
55602      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55603
55604  # Only process if variable expands to non-empty
55605
55606  if test "x$MSVC_DLL" != x; then
55607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55608
55609  # Input might be given as Windows format, start by converting to
55610  # unix format.
55611  path="$MSVC_DLL"
55612  new_path=`$CYGPATH -u "$path"`
55613
55614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55617  # "foo.exe" is OK but "foo" is an error.
55618  #
55619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55620  # It is also a way to make sure we got the proper file name for the real test later on.
55621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55622  if test "x$test_shortpath" = x; then
55623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55624$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55625    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55626  fi
55627
55628  # Call helper function which possibly converts this using DOS-style short mode.
55629  # If so, the updated path is stored in $new_path.
55630
55631  input_path="$new_path"
55632  # Check if we need to convert this using DOS-style short mode. If the path
55633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55634  # take no chances and rewrite it.
55635  # Note: m4 eats our [], so we need to use [ and ] instead.
55636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55637  if test "x$has_forbidden_chars" != x; then
55638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55642      # Going to short mode and back again did indeed matter. Since short mode is
55643      # case insensitive, let's make it lowercase to improve readability.
55644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55645      # Now convert it back to Unix-style (cygpath)
55646      input_path=`$CYGPATH -u "$shortmode_path"`
55647      new_path="$input_path"
55648    fi
55649  fi
55650
55651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55652  if test "x$test_cygdrive_prefix" = x; then
55653    # As a simple fix, exclude /usr/bin since it's not a real path.
55654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55656      # a path prefixed by /cygdrive for fixpath to work.
55657      new_path="$CYGWIN_ROOT_PATH$input_path"
55658    fi
55659  fi
55660
55661
55662  if test "x$path" != "x$new_path"; then
55663    MSVC_DLL="$new_path"
55664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55666  fi
55667
55668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55669
55670  path="$MSVC_DLL"
55671  has_colon=`$ECHO $path | $GREP ^.:`
55672  new_path="$path"
55673  if test "x$has_colon" = x; then
55674    # Not in mixed or Windows style, start by that.
55675    new_path=`cmd //c echo $path`
55676  fi
55677
55678
55679  input_path="$new_path"
55680  # Check if we need to convert this using DOS-style short mode. If the path
55681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55682  # take no chances and rewrite it.
55683  # Note: m4 eats our [], so we need to use [ and ] instead.
55684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55685  if test "x$has_forbidden_chars" != x; then
55686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55688  fi
55689
55690
55691  windows_path="$new_path"
55692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55693    unix_path=`$CYGPATH -u "$windows_path"`
55694    new_path="$unix_path"
55695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55697    new_path="$unix_path"
55698  fi
55699
55700  if test "x$path" != "x$new_path"; then
55701    MSVC_DLL="$new_path"
55702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55703$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55704  fi
55705
55706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55708
55709    else
55710      # We're on a unix platform. Hooray! :)
55711      path="$MSVC_DLL"
55712      has_space=`$ECHO "$path" | $GREP " "`
55713      if test "x$has_space" != x; then
55714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55715$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55717      fi
55718
55719      # Use eval to expand a potential ~
55720      eval path="$path"
55721      if test ! -f "$path" && test ! -d "$path"; then
55722        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55723      fi
55724
55725      if test -d "$path"; then
55726        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55727      else
55728        dir="`$DIRNAME "$path"`"
55729        base="`$BASENAME "$path"`"
55730        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55731      fi
55732    fi
55733  fi
55734
55735      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55736$as_echo_n "checking for $DLL_NAME... " >&6; }
55737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55738$as_echo "$MSVC_DLL" >&6; }
55739    else
55740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55741$as_echo "incorrect, ignoring" >&6; }
55742      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55743$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55744    fi
55745  fi
55746
55747    fi
55748  fi
55749
55750  if test "x$MSVC_DLL" = x; then
55751    # Probe: Check in the Boot JDK directory.
55752    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55753
55754  DLL_NAME="$DLL_NAME"
55755  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55756  METHOD="well-known location in Boot JDK"
55757  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55758    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55759$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55760
55761    # Need to check if the found msvcr is correct architecture
55762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55763$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55764    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55766      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55767      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55769        CORRECT_MSVCR_ARCH="PE32 executable"
55770      else
55771        CORRECT_MSVCR_ARCH="PE32+ executable"
55772      fi
55773    else
55774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55775        CORRECT_MSVCR_ARCH=386
55776      else
55777        CORRECT_MSVCR_ARCH=x86-64
55778      fi
55779    fi
55780    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55782$as_echo "ok" >&6; }
55783      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55784
55785  # Only process if variable expands to non-empty
55786
55787  if test "x$MSVC_DLL" != x; then
55788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55789
55790  # Input might be given as Windows format, start by converting to
55791  # unix format.
55792  path="$MSVC_DLL"
55793  new_path=`$CYGPATH -u "$path"`
55794
55795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55798  # "foo.exe" is OK but "foo" is an error.
55799  #
55800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55801  # It is also a way to make sure we got the proper file name for the real test later on.
55802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55803  if test "x$test_shortpath" = x; then
55804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55805$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55806    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55807  fi
55808
55809  # Call helper function which possibly converts this using DOS-style short mode.
55810  # If so, the updated path is stored in $new_path.
55811
55812  input_path="$new_path"
55813  # Check if we need to convert this using DOS-style short mode. If the path
55814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55815  # take no chances and rewrite it.
55816  # Note: m4 eats our [], so we need to use [ and ] instead.
55817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55818  if test "x$has_forbidden_chars" != x; then
55819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55823      # Going to short mode and back again did indeed matter. Since short mode is
55824      # case insensitive, let's make it lowercase to improve readability.
55825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55826      # Now convert it back to Unix-style (cygpath)
55827      input_path=`$CYGPATH -u "$shortmode_path"`
55828      new_path="$input_path"
55829    fi
55830  fi
55831
55832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55833  if test "x$test_cygdrive_prefix" = x; then
55834    # As a simple fix, exclude /usr/bin since it's not a real path.
55835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55837      # a path prefixed by /cygdrive for fixpath to work.
55838      new_path="$CYGWIN_ROOT_PATH$input_path"
55839    fi
55840  fi
55841
55842
55843  if test "x$path" != "x$new_path"; then
55844    MSVC_DLL="$new_path"
55845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55847  fi
55848
55849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55850
55851  path="$MSVC_DLL"
55852  has_colon=`$ECHO $path | $GREP ^.:`
55853  new_path="$path"
55854  if test "x$has_colon" = x; then
55855    # Not in mixed or Windows style, start by that.
55856    new_path=`cmd //c echo $path`
55857  fi
55858
55859
55860  input_path="$new_path"
55861  # Check if we need to convert this using DOS-style short mode. If the path
55862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55863  # take no chances and rewrite it.
55864  # Note: m4 eats our [], so we need to use [ and ] instead.
55865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55866  if test "x$has_forbidden_chars" != x; then
55867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55869  fi
55870
55871
55872  windows_path="$new_path"
55873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55874    unix_path=`$CYGPATH -u "$windows_path"`
55875    new_path="$unix_path"
55876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55878    new_path="$unix_path"
55879  fi
55880
55881  if test "x$path" != "x$new_path"; then
55882    MSVC_DLL="$new_path"
55883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55885  fi
55886
55887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55889
55890    else
55891      # We're on a unix platform. Hooray! :)
55892      path="$MSVC_DLL"
55893      has_space=`$ECHO "$path" | $GREP " "`
55894      if test "x$has_space" != x; then
55895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55896$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55898      fi
55899
55900      # Use eval to expand a potential ~
55901      eval path="$path"
55902      if test ! -f "$path" && test ! -d "$path"; then
55903        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55904      fi
55905
55906      if test -d "$path"; then
55907        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55908      else
55909        dir="`$DIRNAME "$path"`"
55910        base="`$BASENAME "$path"`"
55911        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55912      fi
55913    fi
55914  fi
55915
55916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55917$as_echo_n "checking for $DLL_NAME... " >&6; }
55918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55919$as_echo "$MSVC_DLL" >&6; }
55920    else
55921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55922$as_echo "incorrect, ignoring" >&6; }
55923      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55924$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55925    fi
55926  fi
55927
55928  fi
55929
55930  if test "x$MSVC_DLL" = x; then
55931    # Probe: Look in the Windows system32 directory
55932    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55933
55934  windows_path="$CYGWIN_SYSTEMROOT"
55935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55936    unix_path=`$CYGPATH -u "$windows_path"`
55937    CYGWIN_SYSTEMROOT="$unix_path"
55938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55940    CYGWIN_SYSTEMROOT="$unix_path"
55941  fi
55942
55943    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55944
55945  DLL_NAME="$DLL_NAME"
55946  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55947  METHOD="well-known location in SYSTEMROOT"
55948  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55949    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55950$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55951
55952    # Need to check if the found msvcr is correct architecture
55953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55954$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55955    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55957      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55958      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55959      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55960        CORRECT_MSVCR_ARCH="PE32 executable"
55961      else
55962        CORRECT_MSVCR_ARCH="PE32+ executable"
55963      fi
55964    else
55965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55966        CORRECT_MSVCR_ARCH=386
55967      else
55968        CORRECT_MSVCR_ARCH=x86-64
55969      fi
55970    fi
55971    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55973$as_echo "ok" >&6; }
55974      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55975
55976  # Only process if variable expands to non-empty
55977
55978  if test "x$MSVC_DLL" != x; then
55979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55980
55981  # Input might be given as Windows format, start by converting to
55982  # unix format.
55983  path="$MSVC_DLL"
55984  new_path=`$CYGPATH -u "$path"`
55985
55986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55989  # "foo.exe" is OK but "foo" is an error.
55990  #
55991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55992  # It is also a way to make sure we got the proper file name for the real test later on.
55993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55994  if test "x$test_shortpath" = x; then
55995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55996$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55997    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55998  fi
55999
56000  # Call helper function which possibly converts this using DOS-style short mode.
56001  # If so, the updated path is stored in $new_path.
56002
56003  input_path="$new_path"
56004  # Check if we need to convert this using DOS-style short mode. If the path
56005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56006  # take no chances and rewrite it.
56007  # Note: m4 eats our [], so we need to use [ and ] instead.
56008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56009  if test "x$has_forbidden_chars" != x; then
56010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56014      # Going to short mode and back again did indeed matter. Since short mode is
56015      # case insensitive, let's make it lowercase to improve readability.
56016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56017      # Now convert it back to Unix-style (cygpath)
56018      input_path=`$CYGPATH -u "$shortmode_path"`
56019      new_path="$input_path"
56020    fi
56021  fi
56022
56023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56024  if test "x$test_cygdrive_prefix" = x; then
56025    # As a simple fix, exclude /usr/bin since it's not a real path.
56026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56028      # a path prefixed by /cygdrive for fixpath to work.
56029      new_path="$CYGWIN_ROOT_PATH$input_path"
56030    fi
56031  fi
56032
56033
56034  if test "x$path" != "x$new_path"; then
56035    MSVC_DLL="$new_path"
56036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56038  fi
56039
56040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56041
56042  path="$MSVC_DLL"
56043  has_colon=`$ECHO $path | $GREP ^.:`
56044  new_path="$path"
56045  if test "x$has_colon" = x; then
56046    # Not in mixed or Windows style, start by that.
56047    new_path=`cmd //c echo $path`
56048  fi
56049
56050
56051  input_path="$new_path"
56052  # Check if we need to convert this using DOS-style short mode. If the path
56053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56054  # take no chances and rewrite it.
56055  # Note: m4 eats our [], so we need to use [ and ] instead.
56056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56057  if test "x$has_forbidden_chars" != x; then
56058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56060  fi
56061
56062
56063  windows_path="$new_path"
56064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56065    unix_path=`$CYGPATH -u "$windows_path"`
56066    new_path="$unix_path"
56067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56069    new_path="$unix_path"
56070  fi
56071
56072  if test "x$path" != "x$new_path"; then
56073    MSVC_DLL="$new_path"
56074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56076  fi
56077
56078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56080
56081    else
56082      # We're on a unix platform. Hooray! :)
56083      path="$MSVC_DLL"
56084      has_space=`$ECHO "$path" | $GREP " "`
56085      if test "x$has_space" != x; then
56086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56087$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56089      fi
56090
56091      # Use eval to expand a potential ~
56092      eval path="$path"
56093      if test ! -f "$path" && test ! -d "$path"; then
56094        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56095      fi
56096
56097      if test -d "$path"; then
56098        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56099      else
56100        dir="`$DIRNAME "$path"`"
56101        base="`$BASENAME "$path"`"
56102        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56103      fi
56104    fi
56105  fi
56106
56107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56108$as_echo_n "checking for $DLL_NAME... " >&6; }
56109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56110$as_echo "$MSVC_DLL" >&6; }
56111    else
56112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56113$as_echo "incorrect, ignoring" >&6; }
56114      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56115$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56116    fi
56117  fi
56118
56119  fi
56120
56121  if test "x$MSVC_DLL" = x; then
56122    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56123    if test "x$VS100COMNTOOLS" != x; then
56124      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56125
56126  windows_path="$CYGWIN_VS_TOOLS_DIR"
56127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56128    unix_path=`$CYGPATH -u "$windows_path"`
56129    CYGWIN_VS_TOOLS_DIR="$unix_path"
56130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56132    CYGWIN_VS_TOOLS_DIR="$unix_path"
56133  fi
56134
56135      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56136        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56137	    | $GREP -i /x64/ | $HEAD --lines 1`
56138      else
56139        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56140	    | $GREP -i /x86/ | $HEAD --lines 1`
56141      fi
56142
56143  DLL_NAME="$DLL_NAME"
56144  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56145  METHOD="search of VS100COMNTOOLS"
56146  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56147    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56148$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56149
56150    # Need to check if the found msvcr is correct architecture
56151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56152$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56153    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56155      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56156      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56158        CORRECT_MSVCR_ARCH="PE32 executable"
56159      else
56160        CORRECT_MSVCR_ARCH="PE32+ executable"
56161      fi
56162    else
56163      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56164        CORRECT_MSVCR_ARCH=386
56165      else
56166        CORRECT_MSVCR_ARCH=x86-64
56167      fi
56168    fi
56169    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56171$as_echo "ok" >&6; }
56172      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56173
56174  # Only process if variable expands to non-empty
56175
56176  if test "x$MSVC_DLL" != x; then
56177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56178
56179  # Input might be given as Windows format, start by converting to
56180  # unix format.
56181  path="$MSVC_DLL"
56182  new_path=`$CYGPATH -u "$path"`
56183
56184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56187  # "foo.exe" is OK but "foo" is an error.
56188  #
56189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56190  # It is also a way to make sure we got the proper file name for the real test later on.
56191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56192  if test "x$test_shortpath" = x; then
56193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56194$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56195    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56196  fi
56197
56198  # Call helper function which possibly converts this using DOS-style short mode.
56199  # If so, the updated path is stored in $new_path.
56200
56201  input_path="$new_path"
56202  # Check if we need to convert this using DOS-style short mode. If the path
56203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56204  # take no chances and rewrite it.
56205  # Note: m4 eats our [], so we need to use [ and ] instead.
56206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56207  if test "x$has_forbidden_chars" != x; then
56208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56212      # Going to short mode and back again did indeed matter. Since short mode is
56213      # case insensitive, let's make it lowercase to improve readability.
56214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56215      # Now convert it back to Unix-style (cygpath)
56216      input_path=`$CYGPATH -u "$shortmode_path"`
56217      new_path="$input_path"
56218    fi
56219  fi
56220
56221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56222  if test "x$test_cygdrive_prefix" = x; then
56223    # As a simple fix, exclude /usr/bin since it's not a real path.
56224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56226      # a path prefixed by /cygdrive for fixpath to work.
56227      new_path="$CYGWIN_ROOT_PATH$input_path"
56228    fi
56229  fi
56230
56231
56232  if test "x$path" != "x$new_path"; then
56233    MSVC_DLL="$new_path"
56234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56235$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56236  fi
56237
56238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56239
56240  path="$MSVC_DLL"
56241  has_colon=`$ECHO $path | $GREP ^.:`
56242  new_path="$path"
56243  if test "x$has_colon" = x; then
56244    # Not in mixed or Windows style, start by that.
56245    new_path=`cmd //c echo $path`
56246  fi
56247
56248
56249  input_path="$new_path"
56250  # Check if we need to convert this using DOS-style short mode. If the path
56251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56252  # take no chances and rewrite it.
56253  # Note: m4 eats our [], so we need to use [ and ] instead.
56254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56255  if test "x$has_forbidden_chars" != x; then
56256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56258  fi
56259
56260
56261  windows_path="$new_path"
56262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56263    unix_path=`$CYGPATH -u "$windows_path"`
56264    new_path="$unix_path"
56265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56267    new_path="$unix_path"
56268  fi
56269
56270  if test "x$path" != "x$new_path"; then
56271    MSVC_DLL="$new_path"
56272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56274  fi
56275
56276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56278
56279    else
56280      # We're on a unix platform. Hooray! :)
56281      path="$MSVC_DLL"
56282      has_space=`$ECHO "$path" | $GREP " "`
56283      if test "x$has_space" != x; then
56284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56287      fi
56288
56289      # Use eval to expand a potential ~
56290      eval path="$path"
56291      if test ! -f "$path" && test ! -d "$path"; then
56292        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56293      fi
56294
56295      if test -d "$path"; then
56296        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56297      else
56298        dir="`$DIRNAME "$path"`"
56299        base="`$BASENAME "$path"`"
56300        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56301      fi
56302    fi
56303  fi
56304
56305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56306$as_echo_n "checking for $DLL_NAME... " >&6; }
56307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56308$as_echo "$MSVC_DLL" >&6; }
56309    else
56310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56311$as_echo "incorrect, ignoring" >&6; }
56312      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56313$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56314    fi
56315  fi
56316
56317    fi
56318  fi
56319
56320  if test "x$MSVC_DLL" = x; then
56321    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56322    # (This was the original behaviour; kept since it might turn something up)
56323    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56324      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56325        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56326	    | $GREP x64 | $HEAD --lines 1`
56327      else
56328        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56329	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56330        if test "x$POSSIBLE_MSVC_DLL" = x; then
56331          # We're grasping at straws now...
56332          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56333	      | $HEAD --lines 1`
56334        fi
56335      fi
56336
56337
56338  DLL_NAME="$DLL_NAME"
56339  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56340  METHOD="search of VCINSTALLDIR"
56341  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56342    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56343$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56344
56345    # Need to check if the found msvcr is correct architecture
56346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56347$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56348    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56350      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56351      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56352      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56353        CORRECT_MSVCR_ARCH="PE32 executable"
56354      else
56355        CORRECT_MSVCR_ARCH="PE32+ executable"
56356      fi
56357    else
56358      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56359        CORRECT_MSVCR_ARCH=386
56360      else
56361        CORRECT_MSVCR_ARCH=x86-64
56362      fi
56363    fi
56364    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56366$as_echo "ok" >&6; }
56367      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56368
56369  # Only process if variable expands to non-empty
56370
56371  if test "x$MSVC_DLL" != x; then
56372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56373
56374  # Input might be given as Windows format, start by converting to
56375  # unix format.
56376  path="$MSVC_DLL"
56377  new_path=`$CYGPATH -u "$path"`
56378
56379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56382  # "foo.exe" is OK but "foo" is an error.
56383  #
56384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56385  # It is also a way to make sure we got the proper file name for the real test later on.
56386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56387  if test "x$test_shortpath" = x; then
56388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56389$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56390    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56391  fi
56392
56393  # Call helper function which possibly converts this using DOS-style short mode.
56394  # If so, the updated path is stored in $new_path.
56395
56396  input_path="$new_path"
56397  # Check if we need to convert this using DOS-style short mode. If the path
56398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56399  # take no chances and rewrite it.
56400  # Note: m4 eats our [], so we need to use [ and ] instead.
56401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56402  if test "x$has_forbidden_chars" != x; then
56403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56407      # Going to short mode and back again did indeed matter. Since short mode is
56408      # case insensitive, let's make it lowercase to improve readability.
56409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56410      # Now convert it back to Unix-style (cygpath)
56411      input_path=`$CYGPATH -u "$shortmode_path"`
56412      new_path="$input_path"
56413    fi
56414  fi
56415
56416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56417  if test "x$test_cygdrive_prefix" = x; then
56418    # As a simple fix, exclude /usr/bin since it's not a real path.
56419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56421      # a path prefixed by /cygdrive for fixpath to work.
56422      new_path="$CYGWIN_ROOT_PATH$input_path"
56423    fi
56424  fi
56425
56426
56427  if test "x$path" != "x$new_path"; then
56428    MSVC_DLL="$new_path"
56429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56430$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56431  fi
56432
56433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56434
56435  path="$MSVC_DLL"
56436  has_colon=`$ECHO $path | $GREP ^.:`
56437  new_path="$path"
56438  if test "x$has_colon" = x; then
56439    # Not in mixed or Windows style, start by that.
56440    new_path=`cmd //c echo $path`
56441  fi
56442
56443
56444  input_path="$new_path"
56445  # Check if we need to convert this using DOS-style short mode. If the path
56446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56447  # take no chances and rewrite it.
56448  # Note: m4 eats our [], so we need to use [ and ] instead.
56449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56450  if test "x$has_forbidden_chars" != x; then
56451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56453  fi
56454
56455
56456  windows_path="$new_path"
56457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56458    unix_path=`$CYGPATH -u "$windows_path"`
56459    new_path="$unix_path"
56460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56462    new_path="$unix_path"
56463  fi
56464
56465  if test "x$path" != "x$new_path"; then
56466    MSVC_DLL="$new_path"
56467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56469  fi
56470
56471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56473
56474    else
56475      # We're on a unix platform. Hooray! :)
56476      path="$MSVC_DLL"
56477      has_space=`$ECHO "$path" | $GREP " "`
56478      if test "x$has_space" != x; then
56479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56480$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56482      fi
56483
56484      # Use eval to expand a potential ~
56485      eval path="$path"
56486      if test ! -f "$path" && test ! -d "$path"; then
56487        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56488      fi
56489
56490      if test -d "$path"; then
56491        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56492      else
56493        dir="`$DIRNAME "$path"`"
56494        base="`$BASENAME "$path"`"
56495        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56496      fi
56497    fi
56498  fi
56499
56500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56501$as_echo_n "checking for $DLL_NAME... " >&6; }
56502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56503$as_echo "$MSVC_DLL" >&6; }
56504    else
56505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56506$as_echo "incorrect, ignoring" >&6; }
56507      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56508$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56509    fi
56510  fi
56511
56512    fi
56513  fi
56514
56515  if test "x$MSVC_DLL" = x; then
56516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56517$as_echo_n "checking for $DLL_NAME... " >&6; }
56518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56519$as_echo "no" >&6; }
56520    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56521  fi
56522
56523      MSVCP_DLL="$MSVC_DLL"
56524    fi
56525
56526  fi
56527
56528  fi
56529
56530
56531  if test "x$NEEDS_LIB_X11" = xfalse; then
56532    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56533      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56534$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56535    fi
56536    X_CFLAGS=
56537    X_LIBS=
56538  else
56539
56540    if test "x${with_x}" = xno; then
56541      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56542    fi
56543
56544    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56545      # The user has specified a X11 base directory. Use it for includes and
56546      # libraries, unless explicitly overridden.
56547      if test "x$x_includes" = xNONE; then
56548        x_includes="${with_x}/include"
56549      fi
56550      if test "x$x_libraries" = xNONE; then
56551        x_libraries="${with_x}/lib"
56552      fi
56553    else
56554      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56555      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56556      # --x-libraries for the sysroot, if that seems to be correct.
56557      if test "x$SYSROOT" != "x"; then
56558        if test "x$x_includes" = xNONE; then
56559          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56560            x_includes="$SYSROOT/usr/X11R6/include"
56561          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56562            x_includes="$SYSROOT/usr/include"
56563          fi
56564        fi
56565        if test "x$x_libraries" = xNONE; then
56566          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56567            x_libraries="$SYSROOT/usr/X11R6/lib"
56568          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56569            x_libraries="$SYSROOT/usr/lib64"
56570          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56571            x_libraries="$SYSROOT/usr/lib"
56572          fi
56573        fi
56574      fi
56575    fi
56576
56577    # Now let autoconf do it's magic
56578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56579$as_echo_n "checking for X... " >&6; }
56580
56581
56582# Check whether --with-x was given.
56583if test "${with_x+set}" = set; then :
56584  withval=$with_x;
56585fi
56586
56587# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56588if test "x$with_x" = xno; then
56589  # The user explicitly disabled X.
56590  have_x=disabled
56591else
56592  case $x_includes,$x_libraries in #(
56593    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56594    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56595  $as_echo_n "(cached) " >&6
56596else
56597  # One or both of the vars are not set, and there is no cached value.
56598ac_x_includes=no ac_x_libraries=no
56599rm -f -r conftest.dir
56600if mkdir conftest.dir; then
56601  cd conftest.dir
56602  cat >Imakefile <<'_ACEOF'
56603incroot:
56604	@echo incroot='${INCROOT}'
56605usrlibdir:
56606	@echo usrlibdir='${USRLIBDIR}'
56607libdir:
56608	@echo libdir='${LIBDIR}'
56609_ACEOF
56610  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56611    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56612    for ac_var in incroot usrlibdir libdir; do
56613      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56614    done
56615    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56616    for ac_extension in a so sl dylib la dll; do
56617      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56618	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56619	ac_im_usrlibdir=$ac_im_libdir; break
56620      fi
56621    done
56622    # Screen out bogus values from the imake configuration.  They are
56623    # bogus both because they are the default anyway, and because
56624    # using them would break gcc on systems where it needs fixed includes.
56625    case $ac_im_incroot in
56626	/usr/include) ac_x_includes= ;;
56627	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56628    esac
56629    case $ac_im_usrlibdir in
56630	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56631	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56632    esac
56633  fi
56634  cd ..
56635  rm -f -r conftest.dir
56636fi
56637
56638# Standard set of common directories for X headers.
56639# Check X11 before X11Rn because it is often a symlink to the current release.
56640ac_x_header_dirs='
56641/usr/X11/include
56642/usr/X11R7/include
56643/usr/X11R6/include
56644/usr/X11R5/include
56645/usr/X11R4/include
56646
56647/usr/include/X11
56648/usr/include/X11R7
56649/usr/include/X11R6
56650/usr/include/X11R5
56651/usr/include/X11R4
56652
56653/usr/local/X11/include
56654/usr/local/X11R7/include
56655/usr/local/X11R6/include
56656/usr/local/X11R5/include
56657/usr/local/X11R4/include
56658
56659/usr/local/include/X11
56660/usr/local/include/X11R7
56661/usr/local/include/X11R6
56662/usr/local/include/X11R5
56663/usr/local/include/X11R4
56664
56665/usr/X386/include
56666/usr/x386/include
56667/usr/XFree86/include/X11
56668
56669/usr/include
56670/usr/local/include
56671/usr/unsupported/include
56672/usr/athena/include
56673/usr/local/x11r5/include
56674/usr/lpp/Xamples/include
56675
56676/usr/openwin/include
56677/usr/openwin/share/include'
56678
56679if test "$ac_x_includes" = no; then
56680  # Guess where to find include files, by looking for Xlib.h.
56681  # First, try using that file with no special directory specified.
56682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56683/* end confdefs.h.  */
56684#include <X11/Xlib.h>
56685_ACEOF
56686if ac_fn_cxx_try_cpp "$LINENO"; then :
56687  # We can compile using X headers with no special include directory.
56688ac_x_includes=
56689else
56690  for ac_dir in $ac_x_header_dirs; do
56691  if test -r "$ac_dir/X11/Xlib.h"; then
56692    ac_x_includes=$ac_dir
56693    break
56694  fi
56695done
56696fi
56697rm -f conftest.err conftest.i conftest.$ac_ext
56698fi # $ac_x_includes = no
56699
56700if test "$ac_x_libraries" = no; then
56701  # Check for the libraries.
56702  # See if we find them without any special options.
56703  # Don't add to $LIBS permanently.
56704  ac_save_LIBS=$LIBS
56705  LIBS="-lX11 $LIBS"
56706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56707/* end confdefs.h.  */
56708#include <X11/Xlib.h>
56709int
56710main ()
56711{
56712XrmInitialize ()
56713  ;
56714  return 0;
56715}
56716_ACEOF
56717if ac_fn_cxx_try_link "$LINENO"; then :
56718  LIBS=$ac_save_LIBS
56719# We can link X programs with no special library path.
56720ac_x_libraries=
56721else
56722  LIBS=$ac_save_LIBS
56723for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56724do
56725  # Don't even attempt the hair of trying to link an X program!
56726  for ac_extension in a so sl dylib la dll; do
56727    if test -r "$ac_dir/libX11.$ac_extension"; then
56728      ac_x_libraries=$ac_dir
56729      break 2
56730    fi
56731  done
56732done
56733fi
56734rm -f core conftest.err conftest.$ac_objext \
56735    conftest$ac_exeext conftest.$ac_ext
56736fi # $ac_x_libraries = no
56737
56738case $ac_x_includes,$ac_x_libraries in #(
56739  no,* | *,no | *\'*)
56740    # Didn't find X, or a directory has "'" in its name.
56741    ac_cv_have_x="have_x=no";; #(
56742  *)
56743    # Record where we found X for the cache.
56744    ac_cv_have_x="have_x=yes\
56745	ac_x_includes='$ac_x_includes'\
56746	ac_x_libraries='$ac_x_libraries'"
56747esac
56748fi
56749;; #(
56750    *) have_x=yes;;
56751  esac
56752  eval "$ac_cv_have_x"
56753fi # $with_x != no
56754
56755if test "$have_x" != yes; then
56756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56757$as_echo "$have_x" >&6; }
56758  no_x=yes
56759else
56760  # If each of the values was on the command line, it overrides each guess.
56761  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56762  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56763  # Update the cache value to reflect the command line values.
56764  ac_cv_have_x="have_x=yes\
56765	ac_x_includes='$x_includes'\
56766	ac_x_libraries='$x_libraries'"
56767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56768$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56769fi
56770
56771    if test "$no_x" = yes; then
56772  # Not all programs may use this symbol, but it does not hurt to define it.
56773
56774$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56775
56776  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56777else
56778  if test -n "$x_includes"; then
56779    X_CFLAGS="$X_CFLAGS -I$x_includes"
56780  fi
56781
56782  # It would also be nice to do this for all -L options, not just this one.
56783  if test -n "$x_libraries"; then
56784    X_LIBS="$X_LIBS -L$x_libraries"
56785    # For Solaris; some versions of Sun CC require a space after -R and
56786    # others require no space.  Words are not sufficient . . . .
56787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56788$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56789    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56790    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56791    ac_cxx_werror_flag=yes
56792    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56793/* end confdefs.h.  */
56794
56795int
56796main ()
56797{
56798
56799  ;
56800  return 0;
56801}
56802_ACEOF
56803if ac_fn_cxx_try_link "$LINENO"; then :
56804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56805$as_echo "no" >&6; }
56806       X_LIBS="$X_LIBS -R$x_libraries"
56807else
56808  LIBS="$ac_xsave_LIBS -R $x_libraries"
56809       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56810/* end confdefs.h.  */
56811
56812int
56813main ()
56814{
56815
56816  ;
56817  return 0;
56818}
56819_ACEOF
56820if ac_fn_cxx_try_link "$LINENO"; then :
56821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56822$as_echo "yes" >&6; }
56823	  X_LIBS="$X_LIBS -R $x_libraries"
56824else
56825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56826$as_echo "neither works" >&6; }
56827fi
56828rm -f core conftest.err conftest.$ac_objext \
56829    conftest$ac_exeext conftest.$ac_ext
56830fi
56831rm -f core conftest.err conftest.$ac_objext \
56832    conftest$ac_exeext conftest.$ac_ext
56833    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56834    LIBS=$ac_xsave_LIBS
56835  fi
56836
56837  # Check for system-dependent libraries X programs must link with.
56838  # Do this before checking for the system-independent R6 libraries
56839  # (-lICE), since we may need -lsocket or whatever for X linking.
56840
56841  if test "$ISC" = yes; then
56842    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56843  else
56844    # Martyn Johnson says this is needed for Ultrix, if the X
56845    # libraries were built with DECnet support.  And Karl Berry says
56846    # the Alpha needs dnet_stub (dnet does not exist).
56847    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56848    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56849/* end confdefs.h.  */
56850
56851/* Override any GCC internal prototype to avoid an error.
56852   Use char because int might match the return type of a GCC
56853   builtin and then its argument prototype would still apply.  */
56854#ifdef __cplusplus
56855extern "C"
56856#endif
56857char XOpenDisplay ();
56858int
56859main ()
56860{
56861return XOpenDisplay ();
56862  ;
56863  return 0;
56864}
56865_ACEOF
56866if ac_fn_cxx_try_link "$LINENO"; then :
56867
56868else
56869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56870$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56871if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56872  $as_echo_n "(cached) " >&6
56873else
56874  ac_check_lib_save_LIBS=$LIBS
56875LIBS="-ldnet  $LIBS"
56876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56877/* end confdefs.h.  */
56878
56879/* Override any GCC internal prototype to avoid an error.
56880   Use char because int might match the return type of a GCC
56881   builtin and then its argument prototype would still apply.  */
56882#ifdef __cplusplus
56883extern "C"
56884#endif
56885char dnet_ntoa ();
56886int
56887main ()
56888{
56889return dnet_ntoa ();
56890  ;
56891  return 0;
56892}
56893_ACEOF
56894if ac_fn_cxx_try_link "$LINENO"; then :
56895  ac_cv_lib_dnet_dnet_ntoa=yes
56896else
56897  ac_cv_lib_dnet_dnet_ntoa=no
56898fi
56899rm -f core conftest.err conftest.$ac_objext \
56900    conftest$ac_exeext conftest.$ac_ext
56901LIBS=$ac_check_lib_save_LIBS
56902fi
56903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56904$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56905if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56906  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56907fi
56908
56909    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56910      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56911$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56912if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56913  $as_echo_n "(cached) " >&6
56914else
56915  ac_check_lib_save_LIBS=$LIBS
56916LIBS="-ldnet_stub  $LIBS"
56917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56918/* end confdefs.h.  */
56919
56920/* Override any GCC internal prototype to avoid an error.
56921   Use char because int might match the return type of a GCC
56922   builtin and then its argument prototype would still apply.  */
56923#ifdef __cplusplus
56924extern "C"
56925#endif
56926char dnet_ntoa ();
56927int
56928main ()
56929{
56930return dnet_ntoa ();
56931  ;
56932  return 0;
56933}
56934_ACEOF
56935if ac_fn_cxx_try_link "$LINENO"; then :
56936  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56937else
56938  ac_cv_lib_dnet_stub_dnet_ntoa=no
56939fi
56940rm -f core conftest.err conftest.$ac_objext \
56941    conftest$ac_exeext conftest.$ac_ext
56942LIBS=$ac_check_lib_save_LIBS
56943fi
56944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56945$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56946if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56947  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56948fi
56949
56950    fi
56951fi
56952rm -f core conftest.err conftest.$ac_objext \
56953    conftest$ac_exeext conftest.$ac_ext
56954    LIBS="$ac_xsave_LIBS"
56955
56956    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56957    # to get the SysV transport functions.
56958    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56959    # needs -lnsl.
56960    # The nsl library prevents programs from opening the X display
56961    # on Irix 5.2, according to T.E. Dickey.
56962    # The functions gethostbyname, getservbyname, and inet_addr are
56963    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56964    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56965if test "x$ac_cv_func_gethostbyname" = xyes; then :
56966
56967fi
56968
56969    if test $ac_cv_func_gethostbyname = no; then
56970      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56971$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56972if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56973  $as_echo_n "(cached) " >&6
56974else
56975  ac_check_lib_save_LIBS=$LIBS
56976LIBS="-lnsl  $LIBS"
56977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56978/* end confdefs.h.  */
56979
56980/* Override any GCC internal prototype to avoid an error.
56981   Use char because int might match the return type of a GCC
56982   builtin and then its argument prototype would still apply.  */
56983#ifdef __cplusplus
56984extern "C"
56985#endif
56986char gethostbyname ();
56987int
56988main ()
56989{
56990return gethostbyname ();
56991  ;
56992  return 0;
56993}
56994_ACEOF
56995if ac_fn_cxx_try_link "$LINENO"; then :
56996  ac_cv_lib_nsl_gethostbyname=yes
56997else
56998  ac_cv_lib_nsl_gethostbyname=no
56999fi
57000rm -f core conftest.err conftest.$ac_objext \
57001    conftest$ac_exeext conftest.$ac_ext
57002LIBS=$ac_check_lib_save_LIBS
57003fi
57004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57005$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57006if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57007  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57008fi
57009
57010      if test $ac_cv_lib_nsl_gethostbyname = no; then
57011	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57012$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57013if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57014  $as_echo_n "(cached) " >&6
57015else
57016  ac_check_lib_save_LIBS=$LIBS
57017LIBS="-lbsd  $LIBS"
57018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57019/* end confdefs.h.  */
57020
57021/* Override any GCC internal prototype to avoid an error.
57022   Use char because int might match the return type of a GCC
57023   builtin and then its argument prototype would still apply.  */
57024#ifdef __cplusplus
57025extern "C"
57026#endif
57027char gethostbyname ();
57028int
57029main ()
57030{
57031return gethostbyname ();
57032  ;
57033  return 0;
57034}
57035_ACEOF
57036if ac_fn_cxx_try_link "$LINENO"; then :
57037  ac_cv_lib_bsd_gethostbyname=yes
57038else
57039  ac_cv_lib_bsd_gethostbyname=no
57040fi
57041rm -f core conftest.err conftest.$ac_objext \
57042    conftest$ac_exeext conftest.$ac_ext
57043LIBS=$ac_check_lib_save_LIBS
57044fi
57045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57046$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57047if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57048  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57049fi
57050
57051      fi
57052    fi
57053
57054    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57055    # socket/setsockopt and other routines are undefined under SCO ODT
57056    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57057    # on later versions), says Simon Leinen: it contains gethostby*
57058    # variants that don't use the name server (or something).  -lsocket
57059    # must be given before -lnsl if both are needed.  We assume that
57060    # if connect needs -lnsl, so does gethostbyname.
57061    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57062if test "x$ac_cv_func_connect" = xyes; then :
57063
57064fi
57065
57066    if test $ac_cv_func_connect = no; then
57067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57068$as_echo_n "checking for connect in -lsocket... " >&6; }
57069if ${ac_cv_lib_socket_connect+:} false; then :
57070  $as_echo_n "(cached) " >&6
57071else
57072  ac_check_lib_save_LIBS=$LIBS
57073LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57075/* end confdefs.h.  */
57076
57077/* Override any GCC internal prototype to avoid an error.
57078   Use char because int might match the return type of a GCC
57079   builtin and then its argument prototype would still apply.  */
57080#ifdef __cplusplus
57081extern "C"
57082#endif
57083char connect ();
57084int
57085main ()
57086{
57087return connect ();
57088  ;
57089  return 0;
57090}
57091_ACEOF
57092if ac_fn_cxx_try_link "$LINENO"; then :
57093  ac_cv_lib_socket_connect=yes
57094else
57095  ac_cv_lib_socket_connect=no
57096fi
57097rm -f core conftest.err conftest.$ac_objext \
57098    conftest$ac_exeext conftest.$ac_ext
57099LIBS=$ac_check_lib_save_LIBS
57100fi
57101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57102$as_echo "$ac_cv_lib_socket_connect" >&6; }
57103if test "x$ac_cv_lib_socket_connect" = xyes; then :
57104  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57105fi
57106
57107    fi
57108
57109    # Guillermo Gomez says -lposix is necessary on A/UX.
57110    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57111if test "x$ac_cv_func_remove" = xyes; then :
57112
57113fi
57114
57115    if test $ac_cv_func_remove = no; then
57116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57117$as_echo_n "checking for remove in -lposix... " >&6; }
57118if ${ac_cv_lib_posix_remove+:} false; then :
57119  $as_echo_n "(cached) " >&6
57120else
57121  ac_check_lib_save_LIBS=$LIBS
57122LIBS="-lposix  $LIBS"
57123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57124/* end confdefs.h.  */
57125
57126/* Override any GCC internal prototype to avoid an error.
57127   Use char because int might match the return type of a GCC
57128   builtin and then its argument prototype would still apply.  */
57129#ifdef __cplusplus
57130extern "C"
57131#endif
57132char remove ();
57133int
57134main ()
57135{
57136return remove ();
57137  ;
57138  return 0;
57139}
57140_ACEOF
57141if ac_fn_cxx_try_link "$LINENO"; then :
57142  ac_cv_lib_posix_remove=yes
57143else
57144  ac_cv_lib_posix_remove=no
57145fi
57146rm -f core conftest.err conftest.$ac_objext \
57147    conftest$ac_exeext conftest.$ac_ext
57148LIBS=$ac_check_lib_save_LIBS
57149fi
57150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57151$as_echo "$ac_cv_lib_posix_remove" >&6; }
57152if test "x$ac_cv_lib_posix_remove" = xyes; then :
57153  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57154fi
57155
57156    fi
57157
57158    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57159    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57160if test "x$ac_cv_func_shmat" = xyes; then :
57161
57162fi
57163
57164    if test $ac_cv_func_shmat = no; then
57165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57166$as_echo_n "checking for shmat in -lipc... " >&6; }
57167if ${ac_cv_lib_ipc_shmat+:} false; then :
57168  $as_echo_n "(cached) " >&6
57169else
57170  ac_check_lib_save_LIBS=$LIBS
57171LIBS="-lipc  $LIBS"
57172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57173/* end confdefs.h.  */
57174
57175/* Override any GCC internal prototype to avoid an error.
57176   Use char because int might match the return type of a GCC
57177   builtin and then its argument prototype would still apply.  */
57178#ifdef __cplusplus
57179extern "C"
57180#endif
57181char shmat ();
57182int
57183main ()
57184{
57185return shmat ();
57186  ;
57187  return 0;
57188}
57189_ACEOF
57190if ac_fn_cxx_try_link "$LINENO"; then :
57191  ac_cv_lib_ipc_shmat=yes
57192else
57193  ac_cv_lib_ipc_shmat=no
57194fi
57195rm -f core conftest.err conftest.$ac_objext \
57196    conftest$ac_exeext conftest.$ac_ext
57197LIBS=$ac_check_lib_save_LIBS
57198fi
57199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57200$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57201if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57202  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57203fi
57204
57205    fi
57206  fi
57207
57208  # Check for libraries that X11R6 Xt/Xaw programs need.
57209  ac_save_LDFLAGS=$LDFLAGS
57210  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57211  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57212  # check for ICE first), but we must link in the order -lSM -lICE or
57213  # we get undefined symbols.  So assume we have SM if we have ICE.
57214  # These have to be linked with before -lX11, unlike the other
57215  # libraries we check for below, so use a different variable.
57216  # John Interrante, Karl Berry
57217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57218$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57219if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57220  $as_echo_n "(cached) " >&6
57221else
57222  ac_check_lib_save_LIBS=$LIBS
57223LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57225/* end confdefs.h.  */
57226
57227/* Override any GCC internal prototype to avoid an error.
57228   Use char because int might match the return type of a GCC
57229   builtin and then its argument prototype would still apply.  */
57230#ifdef __cplusplus
57231extern "C"
57232#endif
57233char IceConnectionNumber ();
57234int
57235main ()
57236{
57237return IceConnectionNumber ();
57238  ;
57239  return 0;
57240}
57241_ACEOF
57242if ac_fn_cxx_try_link "$LINENO"; then :
57243  ac_cv_lib_ICE_IceConnectionNumber=yes
57244else
57245  ac_cv_lib_ICE_IceConnectionNumber=no
57246fi
57247rm -f core conftest.err conftest.$ac_objext \
57248    conftest$ac_exeext conftest.$ac_ext
57249LIBS=$ac_check_lib_save_LIBS
57250fi
57251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57252$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57253if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57254  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57255fi
57256
57257  LDFLAGS=$ac_save_LDFLAGS
57258
57259fi
57260
57261
57262    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57263    # this doesn't make sense so we remove it.
57264    if test "x$COMPILE_TYPE" = xcross; then
57265      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57266    fi
57267
57268    if test "x$no_x" = xyes; then
57269
57270  # Print a helpful message on how to acquire the necessary build dependency.
57271  # x11 is the help tag: freetype, cups, alsa etc
57272  MISSING_DEPENDENCY=x11
57273
57274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57275    cygwin_help $MISSING_DEPENDENCY
57276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57277    msys_help $MISSING_DEPENDENCY
57278  else
57279    PKGHANDLER_COMMAND=
57280
57281    case $PKGHANDLER in
57282      apt-get)
57283        apt_help     $MISSING_DEPENDENCY ;;
57284      yum)
57285        yum_help     $MISSING_DEPENDENCY ;;
57286      brew)
57287        brew_help    $MISSING_DEPENDENCY ;;
57288      port)
57289        port_help    $MISSING_DEPENDENCY ;;
57290      pkgutil)
57291        pkgutil_help $MISSING_DEPENDENCY ;;
57292      pkgadd)
57293        pkgadd_help  $MISSING_DEPENDENCY ;;
57294    esac
57295
57296    if test "x$PKGHANDLER_COMMAND" != x; then
57297      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57298    fi
57299  fi
57300
57301      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57302    fi
57303
57304    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57305      OPENWIN_HOME="/usr/openwin"
57306      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57307      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57308          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57309    fi
57310
57311    ac_ext=c
57312ac_cpp='$CPP $CPPFLAGS'
57313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57315ac_compiler_gnu=$ac_cv_c_compiler_gnu
57316
57317    OLD_CFLAGS="$CFLAGS"
57318    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57319
57320    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57321    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57322do :
57323  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57324ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57325          # include <X11/Xlib.h>
57326          # include <X11/Xutil.h>
57327
57328
57329"
57330if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57331  cat >>confdefs.h <<_ACEOF
57332#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57333_ACEOF
57334 X11_HEADERS_OK=yes
57335else
57336  X11_HEADERS_OK=no; break
57337fi
57338
57339done
57340
57341
57342    if test "x$X11_HEADERS_OK" = xno; then
57343
57344  # Print a helpful message on how to acquire the necessary build dependency.
57345  # x11 is the help tag: freetype, cups, alsa etc
57346  MISSING_DEPENDENCY=x11
57347
57348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57349    cygwin_help $MISSING_DEPENDENCY
57350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57351    msys_help $MISSING_DEPENDENCY
57352  else
57353    PKGHANDLER_COMMAND=
57354
57355    case $PKGHANDLER in
57356      apt-get)
57357        apt_help     $MISSING_DEPENDENCY ;;
57358      yum)
57359        yum_help     $MISSING_DEPENDENCY ;;
57360      brew)
57361        brew_help    $MISSING_DEPENDENCY ;;
57362      port)
57363        port_help    $MISSING_DEPENDENCY ;;
57364      pkgutil)
57365        pkgutil_help $MISSING_DEPENDENCY ;;
57366      pkgadd)
57367        pkgadd_help  $MISSING_DEPENDENCY ;;
57368    esac
57369
57370    if test "x$PKGHANDLER_COMMAND" != x; then
57371      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57372    fi
57373  fi
57374
57375      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57376    fi
57377
57378    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57379    # defined in libawt_xawt.
57380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57381$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57382    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57383/* end confdefs.h.  */
57384#include <X11/extensions/Xrender.h>
57385int
57386main ()
57387{
57388XLinearGradient x;
57389  ;
57390  return 0;
57391}
57392_ACEOF
57393if ac_fn_c_try_compile "$LINENO"; then :
57394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57395$as_echo "yes" >&6; }
57396else
57397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57398$as_echo "no" >&6; }
57399         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57400fi
57401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57402
57403    CFLAGS="$OLD_CFLAGS"
57404    ac_ext=cpp
57405ac_cpp='$CXXCPP $CPPFLAGS'
57406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57409
57410  fi # NEEDS_LIB_X11
57411
57412
57413
57414
57415
57416
57417# Check whether --with-cups was given.
57418if test "${with_cups+set}" = set; then :
57419  withval=$with_cups;
57420fi
57421
57422
57423# Check whether --with-cups-include was given.
57424if test "${with_cups_include+set}" = set; then :
57425  withval=$with_cups_include;
57426fi
57427
57428
57429  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57430    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57431        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57432      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57433$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57434    fi
57435    CUPS_CFLAGS=
57436  else
57437    CUPS_FOUND=no
57438
57439    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57440      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57441    fi
57442
57443    if test "x${with_cups}" != x; then
57444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57445$as_echo_n "checking for cups headers... " >&6; }
57446      if test -s "${with_cups}/include/cups/cups.h"; then
57447        CUPS_CFLAGS="-I${with_cups}/include"
57448        CUPS_FOUND=yes
57449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57450$as_echo "$CUPS_FOUND" >&6; }
57451      else
57452        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57453      fi
57454    fi
57455    if test "x${with_cups_include}" != x; then
57456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57457$as_echo_n "checking for cups headers... " >&6; }
57458      if test -s "${with_cups_include}/cups/cups.h"; then
57459        CUPS_CFLAGS="-I${with_cups_include}"
57460        CUPS_FOUND=yes
57461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57462$as_echo "$CUPS_FOUND" >&6; }
57463      else
57464        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57465      fi
57466    fi
57467    if test "x$CUPS_FOUND" = xno; then
57468      # Are the cups headers installed in the default /usr/include location?
57469      for ac_header in cups/cups.h cups/ppd.h
57470do :
57471  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57472ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57473if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57474  cat >>confdefs.h <<_ACEOF
57475#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57476_ACEOF
57477
57478          CUPS_FOUND=yes
57479          CUPS_CFLAGS=
57480          DEFAULT_CUPS=yes
57481
57482fi
57483
57484done
57485
57486    fi
57487    if test "x$CUPS_FOUND" = xno; then
57488
57489  # Print a helpful message on how to acquire the necessary build dependency.
57490  # cups is the help tag: freetype, cups, alsa etc
57491  MISSING_DEPENDENCY=cups
57492
57493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57494    cygwin_help $MISSING_DEPENDENCY
57495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57496    msys_help $MISSING_DEPENDENCY
57497  else
57498    PKGHANDLER_COMMAND=
57499
57500    case $PKGHANDLER in
57501      apt-get)
57502        apt_help     $MISSING_DEPENDENCY ;;
57503      yum)
57504        yum_help     $MISSING_DEPENDENCY ;;
57505      brew)
57506        brew_help    $MISSING_DEPENDENCY ;;
57507      port)
57508        port_help    $MISSING_DEPENDENCY ;;
57509      pkgutil)
57510        pkgutil_help $MISSING_DEPENDENCY ;;
57511      pkgadd)
57512        pkgadd_help  $MISSING_DEPENDENCY ;;
57513    esac
57514
57515    if test "x$PKGHANDLER_COMMAND" != x; then
57516      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57517    fi
57518  fi
57519
57520      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57521    fi
57522  fi
57523
57524
57525
57526
57527
57528# Check whether --with-freetype was given.
57529if test "${with_freetype+set}" = set; then :
57530  withval=$with_freetype;
57531fi
57532
57533
57534# Check whether --with-freetype-include was given.
57535if test "${with_freetype_include+set}" = set; then :
57536  withval=$with_freetype_include;
57537fi
57538
57539
57540# Check whether --with-freetype-lib was given.
57541if test "${with_freetype_lib+set}" = set; then :
57542  withval=$with_freetype_lib;
57543fi
57544
57545
57546# Check whether --with-freetype-src was given.
57547if test "${with_freetype_src+set}" = set; then :
57548  withval=$with_freetype_src;
57549fi
57550
57551  # Check whether --enable-freetype-bundling was given.
57552if test "${enable_freetype_bundling+set}" = set; then :
57553  enableval=$enable_freetype_bundling;
57554fi
57555
57556
57557  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57558  FREETYPE_BASE_NAME=freetype
57559  FREETYPE_CFLAGS=
57560  FREETYPE_LIBS=
57561  FREETYPE_BUNDLE_LIB_PATH=
57562
57563  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57564    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57565        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57566        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57567        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57568      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57569$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57570    fi
57571    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57572      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57573$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57574    fi
57575  else
57576    # freetype is needed to build; go get it!
57577
57578    BUNDLE_FREETYPE="$enable_freetype_bundling"
57579
57580    if  test "x$with_freetype_src" != x; then
57581      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57582        # Try to build freetype if --with-freetype-src was given on Windows
57583
57584  FREETYPE_SRC_PATH="$with_freetype_src"
57585  BUILD_FREETYPE=yes
57586
57587  # Check if the freetype sources are acessible..
57588  if ! test -d $FREETYPE_SRC_PATH; then
57589    { $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
57590$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57591    BUILD_FREETYPE=no
57592  fi
57593  # ..and contain a vc2010 project file
57594  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57595  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57596    { $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
57597$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57598    BUILD_FREETYPE=no
57599  fi
57600  # Now check if configure found a version of 'msbuild.exe'
57601  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57602    { $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
57603$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;}
57604    BUILD_FREETYPE=no
57605  fi
57606
57607  # Ready to go..
57608  if test "x$BUILD_FREETYPE" = xyes; then
57609    # msbuild requires trailing slashes for output directories
57610    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57611    freetype_lib_path_unix="$freetype_lib_path"
57612    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57613
57614  unix_path="$vcxproj_path"
57615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57616    windows_path=`$CYGPATH -m "$unix_path"`
57617    vcxproj_path="$windows_path"
57618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57619    windows_path=`cmd //c echo $unix_path`
57620    vcxproj_path="$windows_path"
57621  fi
57622
57623
57624  unix_path="$freetype_lib_path"
57625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57626    windows_path=`$CYGPATH -m "$unix_path"`
57627    freetype_lib_path="$windows_path"
57628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57629    windows_path=`cmd //c echo $unix_path`
57630    freetype_lib_path="$windows_path"
57631  fi
57632
57633
57634  unix_path="$freetype_obj_path"
57635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57636    windows_path=`$CYGPATH -m "$unix_path"`
57637    freetype_obj_path="$windows_path"
57638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57639    windows_path=`cmd //c echo $unix_path`
57640    freetype_obj_path="$windows_path"
57641  fi
57642
57643    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57644      freetype_platform=x64
57645    else
57646      freetype_platform=win32
57647    fi
57648
57649    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57650    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57651    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57652    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57653    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57654$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57655
57656    # First we try to build the freetype.dll
57657    $ECHO -e "@echo off\n"\
57658        "$MSBUILD $vcxproj_path "\
57659        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57660        "/p:Configuration=\"Release Multithreaded\" "\
57661        "/p:Platform=$freetype_platform "\
57662        "/p:ConfigurationType=DynamicLibrary "\
57663        "/p:TargetName=freetype "\
57664        "/p:OutDir=\"$freetype_lib_path\" "\
57665        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57666    cmd /c freetype.bat
57667
57668    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57669      # If that succeeds we also build freetype.lib
57670      $ECHO -e "@echo off\n"\
57671          "$MSBUILD $vcxproj_path "\
57672          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57673          "/p:Configuration=\"Release Multithreaded\" "\
57674          "/p:Platform=$freetype_platform "\
57675          "/p:ConfigurationType=StaticLibrary "\
57676          "/p:TargetName=freetype "\
57677          "/p:OutDir=\"$freetype_lib_path\" "\
57678          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57679      cmd /c freetype.bat
57680
57681      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57682        # Once we build both, lib and dll, set freetype lib and include path appropriately
57683        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57684        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57685        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57686$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57687      else
57688        BUILD_FREETYPE=no
57689      fi
57690    else
57691      BUILD_FREETYPE=no
57692    fi
57693  fi
57694
57695        if test "x$BUILD_FREETYPE" = xyes; then
57696          # Okay, we built it. Check that it works.
57697
57698  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57699  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57700  METHOD="--with-freetype-src"
57701
57702  # Let's start with an optimistic view of the world :-)
57703  FOUND_FREETYPE=yes
57704
57705  # First look for the canonical freetype main include file ft2build.h.
57706  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57707    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57708    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57709    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57710      # Fail.
57711      FOUND_FREETYPE=no
57712    fi
57713  fi
57714
57715  if test "x$FOUND_FREETYPE" = xyes; then
57716    # Include file found, let's continue the sanity check.
57717    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57718$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57719
57720    # Reset to default value
57721    FREETYPE_BASE_NAME=freetype
57722    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57723    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57724      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57725          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57726        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57727        # for the .6 version explicitly.
57728        FREETYPE_BASE_NAME=freetype.6
57729        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57730        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57731$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57732      else
57733        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57734$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57735        FOUND_FREETYPE=no
57736      fi
57737    else
57738      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57739        # On Windows, we will need both .lib and .dll file.
57740        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57741          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57742$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57743          FOUND_FREETYPE=no
57744        fi
57745      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57746          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57747        # Found lib in isa dir, use that instead.
57748        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57749        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57750$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57751      fi
57752    fi
57753  fi
57754
57755  if test "x$FOUND_FREETYPE" = xyes; then
57756
57757  # Only process if variable expands to non-empty
57758
57759  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57761
57762  # Input might be given as Windows format, start by converting to
57763  # unix format.
57764  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57765  new_path=`$CYGPATH -u "$path"`
57766
57767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57770  # "foo.exe" is OK but "foo" is an error.
57771  #
57772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57773  # It is also a way to make sure we got the proper file name for the real test later on.
57774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57775  if test "x$test_shortpath" = x; then
57776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57778    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57779  fi
57780
57781  # Call helper function which possibly converts this using DOS-style short mode.
57782  # If so, the updated path is stored in $new_path.
57783
57784  input_path="$new_path"
57785  # Check if we need to convert this using DOS-style short mode. If the path
57786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57787  # take no chances and rewrite it.
57788  # Note: m4 eats our [], so we need to use [ and ] instead.
57789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57790  if test "x$has_forbidden_chars" != x; then
57791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57795      # Going to short mode and back again did indeed matter. Since short mode is
57796      # case insensitive, let's make it lowercase to improve readability.
57797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57798      # Now convert it back to Unix-style (cygpath)
57799      input_path=`$CYGPATH -u "$shortmode_path"`
57800      new_path="$input_path"
57801    fi
57802  fi
57803
57804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57805  if test "x$test_cygdrive_prefix" = x; then
57806    # As a simple fix, exclude /usr/bin since it's not a real path.
57807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57809      # a path prefixed by /cygdrive for fixpath to work.
57810      new_path="$CYGWIN_ROOT_PATH$input_path"
57811    fi
57812  fi
57813
57814
57815  if test "x$path" != "x$new_path"; then
57816    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57818$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57819  fi
57820
57821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57822
57823  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57824  has_colon=`$ECHO $path | $GREP ^.:`
57825  new_path="$path"
57826  if test "x$has_colon" = x; then
57827    # Not in mixed or Windows style, start by that.
57828    new_path=`cmd //c echo $path`
57829  fi
57830
57831
57832  input_path="$new_path"
57833  # Check if we need to convert this using DOS-style short mode. If the path
57834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57835  # take no chances and rewrite it.
57836  # Note: m4 eats our [], so we need to use [ and ] instead.
57837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57838  if test "x$has_forbidden_chars" != x; then
57839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57841  fi
57842
57843
57844  windows_path="$new_path"
57845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57846    unix_path=`$CYGPATH -u "$windows_path"`
57847    new_path="$unix_path"
57848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57850    new_path="$unix_path"
57851  fi
57852
57853  if test "x$path" != "x$new_path"; then
57854    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57856$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57857  fi
57858
57859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57861
57862    else
57863      # We're on a unix platform. Hooray! :)
57864      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57865      has_space=`$ECHO "$path" | $GREP " "`
57866      if test "x$has_space" != x; then
57867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57870      fi
57871
57872      # Use eval to expand a potential ~
57873      eval path="$path"
57874      if test ! -f "$path" && test ! -d "$path"; then
57875        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57876      fi
57877
57878      if test -d "$path"; then
57879        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57880      else
57881        dir="`$DIRNAME "$path"`"
57882        base="`$BASENAME "$path"`"
57883        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57884      fi
57885    fi
57886  fi
57887
57888
57889  # Only process if variable expands to non-empty
57890
57891  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57893
57894  # Input might be given as Windows format, start by converting to
57895  # unix format.
57896  path="$POTENTIAL_FREETYPE_LIB_PATH"
57897  new_path=`$CYGPATH -u "$path"`
57898
57899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57902  # "foo.exe" is OK but "foo" is an error.
57903  #
57904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57905  # It is also a way to make sure we got the proper file name for the real test later on.
57906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57907  if test "x$test_shortpath" = x; then
57908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57910    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57911  fi
57912
57913  # Call helper function which possibly converts this using DOS-style short mode.
57914  # If so, the updated path is stored in $new_path.
57915
57916  input_path="$new_path"
57917  # Check if we need to convert this using DOS-style short mode. If the path
57918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57919  # take no chances and rewrite it.
57920  # Note: m4 eats our [], so we need to use [ and ] instead.
57921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57922  if test "x$has_forbidden_chars" != x; then
57923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57927      # Going to short mode and back again did indeed matter. Since short mode is
57928      # case insensitive, let's make it lowercase to improve readability.
57929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57930      # Now convert it back to Unix-style (cygpath)
57931      input_path=`$CYGPATH -u "$shortmode_path"`
57932      new_path="$input_path"
57933    fi
57934  fi
57935
57936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57937  if test "x$test_cygdrive_prefix" = x; then
57938    # As a simple fix, exclude /usr/bin since it's not a real path.
57939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57941      # a path prefixed by /cygdrive for fixpath to work.
57942      new_path="$CYGWIN_ROOT_PATH$input_path"
57943    fi
57944  fi
57945
57946
57947  if test "x$path" != "x$new_path"; then
57948    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57951  fi
57952
57953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57954
57955  path="$POTENTIAL_FREETYPE_LIB_PATH"
57956  has_colon=`$ECHO $path | $GREP ^.:`
57957  new_path="$path"
57958  if test "x$has_colon" = x; then
57959    # Not in mixed or Windows style, start by that.
57960    new_path=`cmd //c echo $path`
57961  fi
57962
57963
57964  input_path="$new_path"
57965  # Check if we need to convert this using DOS-style short mode. If the path
57966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57967  # take no chances and rewrite it.
57968  # Note: m4 eats our [], so we need to use [ and ] instead.
57969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57970  if test "x$has_forbidden_chars" != x; then
57971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57973  fi
57974
57975
57976  windows_path="$new_path"
57977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57978    unix_path=`$CYGPATH -u "$windows_path"`
57979    new_path="$unix_path"
57980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57982    new_path="$unix_path"
57983  fi
57984
57985  if test "x$path" != "x$new_path"; then
57986    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57989  fi
57990
57991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57993
57994    else
57995      # We're on a unix platform. Hooray! :)
57996      path="$POTENTIAL_FREETYPE_LIB_PATH"
57997      has_space=`$ECHO "$path" | $GREP " "`
57998      if test "x$has_space" != x; then
57999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58002      fi
58003
58004      # Use eval to expand a potential ~
58005      eval path="$path"
58006      if test ! -f "$path" && test ! -d "$path"; then
58007        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58008      fi
58009
58010      if test -d "$path"; then
58011        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58012      else
58013        dir="`$DIRNAME "$path"`"
58014        base="`$BASENAME "$path"`"
58015        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58016      fi
58017    fi
58018  fi
58019
58020
58021    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58023$as_echo_n "checking for freetype includes... " >&6; }
58024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58025$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58026    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58028$as_echo_n "checking for freetype libraries... " >&6; }
58029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58030$as_echo "$FREETYPE_LIB_PATH" >&6; }
58031  fi
58032
58033          if test "x$FOUND_FREETYPE" != xyes; then
58034            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58035          fi
58036        else
58037          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58038$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58039          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58040        fi
58041      else
58042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58043$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58044      fi
58045    fi
58046
58047    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58048      # User has specified settings
58049
58050      if test "x$BUNDLE_FREETYPE" = x; then
58051        # If not specified, default is to bundle freetype
58052        BUNDLE_FREETYPE=yes
58053      fi
58054
58055      if test "x$with_freetype" != x; then
58056        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58057        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58058      fi
58059
58060      # Allow --with-freetype-lib and --with-freetype-include to override
58061      if test "x$with_freetype_include" != x; then
58062        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58063      fi
58064      if test "x$with_freetype_lib" != x; then
58065        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58066      fi
58067
58068      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58069        # Okay, we got it. Check that it works.
58070
58071  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58072  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58073  METHOD="--with-freetype"
58074
58075  # Let's start with an optimistic view of the world :-)
58076  FOUND_FREETYPE=yes
58077
58078  # First look for the canonical freetype main include file ft2build.h.
58079  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58080    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58081    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58082    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58083      # Fail.
58084      FOUND_FREETYPE=no
58085    fi
58086  fi
58087
58088  if test "x$FOUND_FREETYPE" = xyes; then
58089    # Include file found, let's continue the sanity check.
58090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58091$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58092
58093    # Reset to default value
58094    FREETYPE_BASE_NAME=freetype
58095    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58096    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58097      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58098          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58099        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58100        # for the .6 version explicitly.
58101        FREETYPE_BASE_NAME=freetype.6
58102        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58103        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58104$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58105      else
58106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58107$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58108        FOUND_FREETYPE=no
58109      fi
58110    else
58111      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58112        # On Windows, we will need both .lib and .dll file.
58113        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58114          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58115$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58116          FOUND_FREETYPE=no
58117        fi
58118      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58120        # Found lib in isa dir, use that instead.
58121        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58122        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58123$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58124      fi
58125    fi
58126  fi
58127
58128  if test "x$FOUND_FREETYPE" = xyes; then
58129
58130  # Only process if variable expands to non-empty
58131
58132  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58134
58135  # Input might be given as Windows format, start by converting to
58136  # unix format.
58137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58138  new_path=`$CYGPATH -u "$path"`
58139
58140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58143  # "foo.exe" is OK but "foo" is an error.
58144  #
58145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58146  # It is also a way to make sure we got the proper file name for the real test later on.
58147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58148  if test "x$test_shortpath" = x; then
58149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58152  fi
58153
58154  # Call helper function which possibly converts this using DOS-style short mode.
58155  # If so, the updated path is stored in $new_path.
58156
58157  input_path="$new_path"
58158  # Check if we need to convert this using DOS-style short mode. If the path
58159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58160  # take no chances and rewrite it.
58161  # Note: m4 eats our [], so we need to use [ and ] instead.
58162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58163  if test "x$has_forbidden_chars" != x; then
58164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58168      # Going to short mode and back again did indeed matter. Since short mode is
58169      # case insensitive, let's make it lowercase to improve readability.
58170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58171      # Now convert it back to Unix-style (cygpath)
58172      input_path=`$CYGPATH -u "$shortmode_path"`
58173      new_path="$input_path"
58174    fi
58175  fi
58176
58177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58178  if test "x$test_cygdrive_prefix" = x; then
58179    # As a simple fix, exclude /usr/bin since it's not a real path.
58180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58182      # a path prefixed by /cygdrive for fixpath to work.
58183      new_path="$CYGWIN_ROOT_PATH$input_path"
58184    fi
58185  fi
58186
58187
58188  if test "x$path" != "x$new_path"; then
58189    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58192  fi
58193
58194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58195
58196  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58197  has_colon=`$ECHO $path | $GREP ^.:`
58198  new_path="$path"
58199  if test "x$has_colon" = x; then
58200    # Not in mixed or Windows style, start by that.
58201    new_path=`cmd //c echo $path`
58202  fi
58203
58204
58205  input_path="$new_path"
58206  # Check if we need to convert this using DOS-style short mode. If the path
58207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58208  # take no chances and rewrite it.
58209  # Note: m4 eats our [], so we need to use [ and ] instead.
58210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58211  if test "x$has_forbidden_chars" != x; then
58212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58214  fi
58215
58216
58217  windows_path="$new_path"
58218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58219    unix_path=`$CYGPATH -u "$windows_path"`
58220    new_path="$unix_path"
58221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58223    new_path="$unix_path"
58224  fi
58225
58226  if test "x$path" != "x$new_path"; then
58227    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58230  fi
58231
58232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58234
58235    else
58236      # We're on a unix platform. Hooray! :)
58237      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58238      has_space=`$ECHO "$path" | $GREP " "`
58239      if test "x$has_space" != x; then
58240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58243      fi
58244
58245      # Use eval to expand a potential ~
58246      eval path="$path"
58247      if test ! -f "$path" && test ! -d "$path"; then
58248        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58249      fi
58250
58251      if test -d "$path"; then
58252        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58253      else
58254        dir="`$DIRNAME "$path"`"
58255        base="`$BASENAME "$path"`"
58256        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58257      fi
58258    fi
58259  fi
58260
58261
58262  # Only process if variable expands to non-empty
58263
58264  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58266
58267  # Input might be given as Windows format, start by converting to
58268  # unix format.
58269  path="$POTENTIAL_FREETYPE_LIB_PATH"
58270  new_path=`$CYGPATH -u "$path"`
58271
58272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58275  # "foo.exe" is OK but "foo" is an error.
58276  #
58277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58278  # It is also a way to make sure we got the proper file name for the real test later on.
58279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58280  if test "x$test_shortpath" = x; then
58281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58283    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58284  fi
58285
58286  # Call helper function which possibly converts this using DOS-style short mode.
58287  # If so, the updated path is stored in $new_path.
58288
58289  input_path="$new_path"
58290  # Check if we need to convert this using DOS-style short mode. If the path
58291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58292  # take no chances and rewrite it.
58293  # Note: m4 eats our [], so we need to use [ and ] instead.
58294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58295  if test "x$has_forbidden_chars" != x; then
58296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58300      # Going to short mode and back again did indeed matter. Since short mode is
58301      # case insensitive, let's make it lowercase to improve readability.
58302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58303      # Now convert it back to Unix-style (cygpath)
58304      input_path=`$CYGPATH -u "$shortmode_path"`
58305      new_path="$input_path"
58306    fi
58307  fi
58308
58309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58310  if test "x$test_cygdrive_prefix" = x; then
58311    # As a simple fix, exclude /usr/bin since it's not a real path.
58312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58314      # a path prefixed by /cygdrive for fixpath to work.
58315      new_path="$CYGWIN_ROOT_PATH$input_path"
58316    fi
58317  fi
58318
58319
58320  if test "x$path" != "x$new_path"; then
58321    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58324  fi
58325
58326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58327
58328  path="$POTENTIAL_FREETYPE_LIB_PATH"
58329  has_colon=`$ECHO $path | $GREP ^.:`
58330  new_path="$path"
58331  if test "x$has_colon" = x; then
58332    # Not in mixed or Windows style, start by that.
58333    new_path=`cmd //c echo $path`
58334  fi
58335
58336
58337  input_path="$new_path"
58338  # Check if we need to convert this using DOS-style short mode. If the path
58339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58340  # take no chances and rewrite it.
58341  # Note: m4 eats our [], so we need to use [ and ] instead.
58342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58343  if test "x$has_forbidden_chars" != x; then
58344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58346  fi
58347
58348
58349  windows_path="$new_path"
58350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58351    unix_path=`$CYGPATH -u "$windows_path"`
58352    new_path="$unix_path"
58353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58355    new_path="$unix_path"
58356  fi
58357
58358  if test "x$path" != "x$new_path"; then
58359    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58362  fi
58363
58364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58366
58367    else
58368      # We're on a unix platform. Hooray! :)
58369      path="$POTENTIAL_FREETYPE_LIB_PATH"
58370      has_space=`$ECHO "$path" | $GREP " "`
58371      if test "x$has_space" != x; then
58372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58375      fi
58376
58377      # Use eval to expand a potential ~
58378      eval path="$path"
58379      if test ! -f "$path" && test ! -d "$path"; then
58380        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58381      fi
58382
58383      if test -d "$path"; then
58384        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58385      else
58386        dir="`$DIRNAME "$path"`"
58387        base="`$BASENAME "$path"`"
58388        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58389      fi
58390    fi
58391  fi
58392
58393
58394    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58396$as_echo_n "checking for freetype includes... " >&6; }
58397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58398$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58399    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58401$as_echo_n "checking for freetype libraries... " >&6; }
58402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58403$as_echo "$FREETYPE_LIB_PATH" >&6; }
58404  fi
58405
58406        if test "x$FOUND_FREETYPE" != xyes; then
58407          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58408        fi
58409      else
58410        # User specified only one of lib or include. This is an error.
58411        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58412          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58413$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58414          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58415        else
58416          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58417$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58418          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58419        fi
58420      fi
58421    else
58422      # User did not specify settings, but we need freetype. Try to locate it.
58423
58424      if test "x$BUNDLE_FREETYPE" = x; then
58425        # If not specified, default is to bundle freetype only on windows
58426        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58427          BUNDLE_FREETYPE=yes
58428        else
58429          BUNDLE_FREETYPE=no
58430        fi
58431      fi
58432
58433      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58434      if test "x$SYSROOT" = x; then
58435        if test "x$FOUND_FREETYPE" != xyes; then
58436          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58437          if test "x$PKG_CONFIG" != x; then
58438
58439pkg_failed=no
58440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58441$as_echo_n "checking for FREETYPE... " >&6; }
58442
58443if test -n "$FREETYPE_CFLAGS"; then
58444    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58445 elif test -n "$PKG_CONFIG"; then
58446    if test -n "$PKG_CONFIG" && \
58447    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58448  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58449  ac_status=$?
58450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58451  test $ac_status = 0; }; then
58452  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58453else
58454  pkg_failed=yes
58455fi
58456 else
58457    pkg_failed=untried
58458fi
58459if test -n "$FREETYPE_LIBS"; then
58460    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58461 elif test -n "$PKG_CONFIG"; then
58462    if test -n "$PKG_CONFIG" && \
58463    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58464  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58465  ac_status=$?
58466  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58467  test $ac_status = 0; }; then
58468  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58469else
58470  pkg_failed=yes
58471fi
58472 else
58473    pkg_failed=untried
58474fi
58475
58476
58477
58478if test $pkg_failed = yes; then
58479
58480if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58481        _pkg_short_errors_supported=yes
58482else
58483        _pkg_short_errors_supported=no
58484fi
58485        if test $_pkg_short_errors_supported = yes; then
58486	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58487        else
58488	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58489        fi
58490	# Put the nasty error message in config.log where it belongs
58491	echo "$FREETYPE_PKG_ERRORS" >&5
58492
58493	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58494$as_echo "no" >&6; }
58495                FOUND_FREETYPE=no
58496elif test $pkg_failed = untried; then
58497	FOUND_FREETYPE=no
58498else
58499	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58500	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58502$as_echo "yes" >&6; }
58503	FOUND_FREETYPE=yes
58504fi
58505            if test "x$FOUND_FREETYPE" = xyes; then
58506              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58507              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58508              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58509              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58510                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58511              fi
58512              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58513              if test "x$BUNDLE_FREETYPE" = xyes; then
58514                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58515$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58516                FOUND_FREETYPE=no
58517              else
58518                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58519$as_echo_n "checking for freetype... " >&6; }
58520                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58521$as_echo "yes (using pkg-config)" >&6; }
58522              fi
58523            fi
58524          fi
58525        fi
58526      fi
58527
58528      if test "x$FOUND_FREETYPE" != xyes; then
58529        # Check in well-known locations
58530        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58531          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58532
58533  windows_path="$FREETYPE_BASE_DIR"
58534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58535    unix_path=`$CYGPATH -u "$windows_path"`
58536    FREETYPE_BASE_DIR="$unix_path"
58537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58539    FREETYPE_BASE_DIR="$unix_path"
58540  fi
58541
58542
58543  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58544  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58545  METHOD="well-known location"
58546
58547  # Let's start with an optimistic view of the world :-)
58548  FOUND_FREETYPE=yes
58549
58550  # First look for the canonical freetype main include file ft2build.h.
58551  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58552    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58553    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58554    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58555      # Fail.
58556      FOUND_FREETYPE=no
58557    fi
58558  fi
58559
58560  if test "x$FOUND_FREETYPE" = xyes; then
58561    # Include file found, let's continue the sanity check.
58562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58563$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58564
58565    # Reset to default value
58566    FREETYPE_BASE_NAME=freetype
58567    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58568    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58569      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58570          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58571        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58572        # for the .6 version explicitly.
58573        FREETYPE_BASE_NAME=freetype.6
58574        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58575        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58576$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58577      else
58578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58579$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58580        FOUND_FREETYPE=no
58581      fi
58582    else
58583      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58584        # On Windows, we will need both .lib and .dll file.
58585        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58586          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58587$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58588          FOUND_FREETYPE=no
58589        fi
58590      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58591          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58592        # Found lib in isa dir, use that instead.
58593        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58594        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58595$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58596      fi
58597    fi
58598  fi
58599
58600  if test "x$FOUND_FREETYPE" = xyes; then
58601
58602  # Only process if variable expands to non-empty
58603
58604  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58606
58607  # Input might be given as Windows format, start by converting to
58608  # unix format.
58609  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58610  new_path=`$CYGPATH -u "$path"`
58611
58612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58615  # "foo.exe" is OK but "foo" is an error.
58616  #
58617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58618  # It is also a way to make sure we got the proper file name for the real test later on.
58619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58620  if test "x$test_shortpath" = x; then
58621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58624  fi
58625
58626  # Call helper function which possibly converts this using DOS-style short mode.
58627  # If so, the updated path is stored in $new_path.
58628
58629  input_path="$new_path"
58630  # Check if we need to convert this using DOS-style short mode. If the path
58631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58632  # take no chances and rewrite it.
58633  # Note: m4 eats our [], so we need to use [ and ] instead.
58634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58635  if test "x$has_forbidden_chars" != x; then
58636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58640      # Going to short mode and back again did indeed matter. Since short mode is
58641      # case insensitive, let's make it lowercase to improve readability.
58642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58643      # Now convert it back to Unix-style (cygpath)
58644      input_path=`$CYGPATH -u "$shortmode_path"`
58645      new_path="$input_path"
58646    fi
58647  fi
58648
58649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58650  if test "x$test_cygdrive_prefix" = x; then
58651    # As a simple fix, exclude /usr/bin since it's not a real path.
58652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58654      # a path prefixed by /cygdrive for fixpath to work.
58655      new_path="$CYGWIN_ROOT_PATH$input_path"
58656    fi
58657  fi
58658
58659
58660  if test "x$path" != "x$new_path"; then
58661    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58664  fi
58665
58666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58667
58668  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58669  has_colon=`$ECHO $path | $GREP ^.:`
58670  new_path="$path"
58671  if test "x$has_colon" = x; then
58672    # Not in mixed or Windows style, start by that.
58673    new_path=`cmd //c echo $path`
58674  fi
58675
58676
58677  input_path="$new_path"
58678  # Check if we need to convert this using DOS-style short mode. If the path
58679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58680  # take no chances and rewrite it.
58681  # Note: m4 eats our [], so we need to use [ and ] instead.
58682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58683  if test "x$has_forbidden_chars" != x; then
58684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58686  fi
58687
58688
58689  windows_path="$new_path"
58690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58691    unix_path=`$CYGPATH -u "$windows_path"`
58692    new_path="$unix_path"
58693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58695    new_path="$unix_path"
58696  fi
58697
58698  if test "x$path" != "x$new_path"; then
58699    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58702  fi
58703
58704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58706
58707    else
58708      # We're on a unix platform. Hooray! :)
58709      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58710      has_space=`$ECHO "$path" | $GREP " "`
58711      if test "x$has_space" != x; then
58712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58715      fi
58716
58717      # Use eval to expand a potential ~
58718      eval path="$path"
58719      if test ! -f "$path" && test ! -d "$path"; then
58720        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58721      fi
58722
58723      if test -d "$path"; then
58724        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58725      else
58726        dir="`$DIRNAME "$path"`"
58727        base="`$BASENAME "$path"`"
58728        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58729      fi
58730    fi
58731  fi
58732
58733
58734  # Only process if variable expands to non-empty
58735
58736  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58738
58739  # Input might be given as Windows format, start by converting to
58740  # unix format.
58741  path="$POTENTIAL_FREETYPE_LIB_PATH"
58742  new_path=`$CYGPATH -u "$path"`
58743
58744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58747  # "foo.exe" is OK but "foo" is an error.
58748  #
58749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58750  # It is also a way to make sure we got the proper file name for the real test later on.
58751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58752  if test "x$test_shortpath" = x; then
58753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58755    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58756  fi
58757
58758  # Call helper function which possibly converts this using DOS-style short mode.
58759  # If so, the updated path is stored in $new_path.
58760
58761  input_path="$new_path"
58762  # Check if we need to convert this using DOS-style short mode. If the path
58763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58764  # take no chances and rewrite it.
58765  # Note: m4 eats our [], so we need to use [ and ] instead.
58766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58767  if test "x$has_forbidden_chars" != x; then
58768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58772      # Going to short mode and back again did indeed matter. Since short mode is
58773      # case insensitive, let's make it lowercase to improve readability.
58774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58775      # Now convert it back to Unix-style (cygpath)
58776      input_path=`$CYGPATH -u "$shortmode_path"`
58777      new_path="$input_path"
58778    fi
58779  fi
58780
58781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58782  if test "x$test_cygdrive_prefix" = x; then
58783    # As a simple fix, exclude /usr/bin since it's not a real path.
58784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58786      # a path prefixed by /cygdrive for fixpath to work.
58787      new_path="$CYGWIN_ROOT_PATH$input_path"
58788    fi
58789  fi
58790
58791
58792  if test "x$path" != "x$new_path"; then
58793    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58796  fi
58797
58798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58799
58800  path="$POTENTIAL_FREETYPE_LIB_PATH"
58801  has_colon=`$ECHO $path | $GREP ^.:`
58802  new_path="$path"
58803  if test "x$has_colon" = x; then
58804    # Not in mixed or Windows style, start by that.
58805    new_path=`cmd //c echo $path`
58806  fi
58807
58808
58809  input_path="$new_path"
58810  # Check if we need to convert this using DOS-style short mode. If the path
58811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58812  # take no chances and rewrite it.
58813  # Note: m4 eats our [], so we need to use [ and ] instead.
58814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58815  if test "x$has_forbidden_chars" != x; then
58816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58818  fi
58819
58820
58821  windows_path="$new_path"
58822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58823    unix_path=`$CYGPATH -u "$windows_path"`
58824    new_path="$unix_path"
58825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58827    new_path="$unix_path"
58828  fi
58829
58830  if test "x$path" != "x$new_path"; then
58831    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58833$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58834  fi
58835
58836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58838
58839    else
58840      # We're on a unix platform. Hooray! :)
58841      path="$POTENTIAL_FREETYPE_LIB_PATH"
58842      has_space=`$ECHO "$path" | $GREP " "`
58843      if test "x$has_space" != x; then
58844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58846        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58847      fi
58848
58849      # Use eval to expand a potential ~
58850      eval path="$path"
58851      if test ! -f "$path" && test ! -d "$path"; then
58852        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58853      fi
58854
58855      if test -d "$path"; then
58856        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58857      else
58858        dir="`$DIRNAME "$path"`"
58859        base="`$BASENAME "$path"`"
58860        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58861      fi
58862    fi
58863  fi
58864
58865
58866    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58868$as_echo_n "checking for freetype includes... " >&6; }
58869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58870$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58871    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58873$as_echo_n "checking for freetype libraries... " >&6; }
58874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58875$as_echo "$FREETYPE_LIB_PATH" >&6; }
58876  fi
58877
58878          if test "x$FOUND_FREETYPE" != xyes; then
58879            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58880
58881  windows_path="$FREETYPE_BASE_DIR"
58882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58883    unix_path=`$CYGPATH -u "$windows_path"`
58884    FREETYPE_BASE_DIR="$unix_path"
58885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58887    FREETYPE_BASE_DIR="$unix_path"
58888  fi
58889
58890
58891  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58892  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58893  METHOD="well-known location"
58894
58895  # Let's start with an optimistic view of the world :-)
58896  FOUND_FREETYPE=yes
58897
58898  # First look for the canonical freetype main include file ft2build.h.
58899  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58900    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58901    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58902    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58903      # Fail.
58904      FOUND_FREETYPE=no
58905    fi
58906  fi
58907
58908  if test "x$FOUND_FREETYPE" = xyes; then
58909    # Include file found, let's continue the sanity check.
58910    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58911$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58912
58913    # Reset to default value
58914    FREETYPE_BASE_NAME=freetype
58915    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58916    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58917      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58918          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58919        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58920        # for the .6 version explicitly.
58921        FREETYPE_BASE_NAME=freetype.6
58922        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58923        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58924$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58925      else
58926        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58927$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58928        FOUND_FREETYPE=no
58929      fi
58930    else
58931      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58932        # On Windows, we will need both .lib and .dll file.
58933        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58934          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58935$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58936          FOUND_FREETYPE=no
58937        fi
58938      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58939          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58940        # Found lib in isa dir, use that instead.
58941        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58942        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58943$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58944      fi
58945    fi
58946  fi
58947
58948  if test "x$FOUND_FREETYPE" = xyes; then
58949
58950  # Only process if variable expands to non-empty
58951
58952  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58954
58955  # Input might be given as Windows format, start by converting to
58956  # unix format.
58957  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58958  new_path=`$CYGPATH -u "$path"`
58959
58960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58963  # "foo.exe" is OK but "foo" is an error.
58964  #
58965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58966  # It is also a way to make sure we got the proper file name for the real test later on.
58967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58968  if test "x$test_shortpath" = x; then
58969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58972  fi
58973
58974  # Call helper function which possibly converts this using DOS-style short mode.
58975  # If so, the updated path is stored in $new_path.
58976
58977  input_path="$new_path"
58978  # Check if we need to convert this using DOS-style short mode. If the path
58979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58980  # take no chances and rewrite it.
58981  # Note: m4 eats our [], so we need to use [ and ] instead.
58982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58983  if test "x$has_forbidden_chars" != x; then
58984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58988      # Going to short mode and back again did indeed matter. Since short mode is
58989      # case insensitive, let's make it lowercase to improve readability.
58990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58991      # Now convert it back to Unix-style (cygpath)
58992      input_path=`$CYGPATH -u "$shortmode_path"`
58993      new_path="$input_path"
58994    fi
58995  fi
58996
58997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58998  if test "x$test_cygdrive_prefix" = x; then
58999    # As a simple fix, exclude /usr/bin since it's not a real path.
59000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59002      # a path prefixed by /cygdrive for fixpath to work.
59003      new_path="$CYGWIN_ROOT_PATH$input_path"
59004    fi
59005  fi
59006
59007
59008  if test "x$path" != "x$new_path"; then
59009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59012  fi
59013
59014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59015
59016  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59017  has_colon=`$ECHO $path | $GREP ^.:`
59018  new_path="$path"
59019  if test "x$has_colon" = x; then
59020    # Not in mixed or Windows style, start by that.
59021    new_path=`cmd //c echo $path`
59022  fi
59023
59024
59025  input_path="$new_path"
59026  # Check if we need to convert this using DOS-style short mode. If the path
59027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59028  # take no chances and rewrite it.
59029  # Note: m4 eats our [], so we need to use [ and ] instead.
59030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59031  if test "x$has_forbidden_chars" != x; then
59032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59034  fi
59035
59036
59037  windows_path="$new_path"
59038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59039    unix_path=`$CYGPATH -u "$windows_path"`
59040    new_path="$unix_path"
59041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59043    new_path="$unix_path"
59044  fi
59045
59046  if test "x$path" != "x$new_path"; then
59047    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59050  fi
59051
59052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59054
59055    else
59056      # We're on a unix platform. Hooray! :)
59057      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59058      has_space=`$ECHO "$path" | $GREP " "`
59059      if test "x$has_space" != x; then
59060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59062        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59063      fi
59064
59065      # Use eval to expand a potential ~
59066      eval path="$path"
59067      if test ! -f "$path" && test ! -d "$path"; then
59068        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59069      fi
59070
59071      if test -d "$path"; then
59072        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59073      else
59074        dir="`$DIRNAME "$path"`"
59075        base="`$BASENAME "$path"`"
59076        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59077      fi
59078    fi
59079  fi
59080
59081
59082  # Only process if variable expands to non-empty
59083
59084  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59086
59087  # Input might be given as Windows format, start by converting to
59088  # unix format.
59089  path="$POTENTIAL_FREETYPE_LIB_PATH"
59090  new_path=`$CYGPATH -u "$path"`
59091
59092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59095  # "foo.exe" is OK but "foo" is an error.
59096  #
59097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59098  # It is also a way to make sure we got the proper file name for the real test later on.
59099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59100  if test "x$test_shortpath" = x; then
59101    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59102$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59103    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59104  fi
59105
59106  # Call helper function which possibly converts this using DOS-style short mode.
59107  # If so, the updated path is stored in $new_path.
59108
59109  input_path="$new_path"
59110  # Check if we need to convert this using DOS-style short mode. If the path
59111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59112  # take no chances and rewrite it.
59113  # Note: m4 eats our [], so we need to use [ and ] instead.
59114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59115  if test "x$has_forbidden_chars" != x; then
59116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59120      # Going to short mode and back again did indeed matter. Since short mode is
59121      # case insensitive, let's make it lowercase to improve readability.
59122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59123      # Now convert it back to Unix-style (cygpath)
59124      input_path=`$CYGPATH -u "$shortmode_path"`
59125      new_path="$input_path"
59126    fi
59127  fi
59128
59129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59130  if test "x$test_cygdrive_prefix" = x; then
59131    # As a simple fix, exclude /usr/bin since it's not a real path.
59132    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59134      # a path prefixed by /cygdrive for fixpath to work.
59135      new_path="$CYGWIN_ROOT_PATH$input_path"
59136    fi
59137  fi
59138
59139
59140  if test "x$path" != "x$new_path"; then
59141    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59143$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59144  fi
59145
59146    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59147
59148  path="$POTENTIAL_FREETYPE_LIB_PATH"
59149  has_colon=`$ECHO $path | $GREP ^.:`
59150  new_path="$path"
59151  if test "x$has_colon" = x; then
59152    # Not in mixed or Windows style, start by that.
59153    new_path=`cmd //c echo $path`
59154  fi
59155
59156
59157  input_path="$new_path"
59158  # Check if we need to convert this using DOS-style short mode. If the path
59159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59160  # take no chances and rewrite it.
59161  # Note: m4 eats our [], so we need to use [ and ] instead.
59162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59163  if test "x$has_forbidden_chars" != x; then
59164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59166  fi
59167
59168
59169  windows_path="$new_path"
59170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59171    unix_path=`$CYGPATH -u "$windows_path"`
59172    new_path="$unix_path"
59173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59175    new_path="$unix_path"
59176  fi
59177
59178  if test "x$path" != "x$new_path"; then
59179    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59181$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59182  fi
59183
59184  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59185  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59186
59187    else
59188      # We're on a unix platform. Hooray! :)
59189      path="$POTENTIAL_FREETYPE_LIB_PATH"
59190      has_space=`$ECHO "$path" | $GREP " "`
59191      if test "x$has_space" != x; then
59192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59193$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59194        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59195      fi
59196
59197      # Use eval to expand a potential ~
59198      eval path="$path"
59199      if test ! -f "$path" && test ! -d "$path"; then
59200        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59201      fi
59202
59203      if test -d "$path"; then
59204        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59205      else
59206        dir="`$DIRNAME "$path"`"
59207        base="`$BASENAME "$path"`"
59208        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59209      fi
59210    fi
59211  fi
59212
59213
59214    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59216$as_echo_n "checking for freetype includes... " >&6; }
59217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59218$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59219    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59221$as_echo_n "checking for freetype libraries... " >&6; }
59222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59223$as_echo "$FREETYPE_LIB_PATH" >&6; }
59224  fi
59225
59226          fi
59227          if test "x$FOUND_FREETYPE" != xyes; then
59228            FREETYPE_BASE_DIR="$HOME/freetype"
59229
59230  windows_path="$FREETYPE_BASE_DIR"
59231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59232    unix_path=`$CYGPATH -u "$windows_path"`
59233    FREETYPE_BASE_DIR="$unix_path"
59234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59236    FREETYPE_BASE_DIR="$unix_path"
59237  fi
59238
59239            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59240
59241  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59242  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59243  METHOD="well-known location"
59244
59245  # Let's start with an optimistic view of the world :-)
59246  FOUND_FREETYPE=yes
59247
59248  # First look for the canonical freetype main include file ft2build.h.
59249  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59250    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59251    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59252    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59253      # Fail.
59254      FOUND_FREETYPE=no
59255    fi
59256  fi
59257
59258  if test "x$FOUND_FREETYPE" = xyes; then
59259    # Include file found, let's continue the sanity check.
59260    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59261$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59262
59263    # Reset to default value
59264    FREETYPE_BASE_NAME=freetype
59265    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59266    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59267      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59268          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59269        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59270        # for the .6 version explicitly.
59271        FREETYPE_BASE_NAME=freetype.6
59272        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59273        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59274$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59275      else
59276        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59277$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59278        FOUND_FREETYPE=no
59279      fi
59280    else
59281      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59282        # On Windows, we will need both .lib and .dll file.
59283        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59284          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59285$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59286          FOUND_FREETYPE=no
59287        fi
59288      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59289          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59290        # Found lib in isa dir, use that instead.
59291        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59292        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59293$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59294      fi
59295    fi
59296  fi
59297
59298  if test "x$FOUND_FREETYPE" = xyes; then
59299
59300  # Only process if variable expands to non-empty
59301
59302  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59304
59305  # Input might be given as Windows format, start by converting to
59306  # unix format.
59307  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59308  new_path=`$CYGPATH -u "$path"`
59309
59310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59313  # "foo.exe" is OK but "foo" is an error.
59314  #
59315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59316  # It is also a way to make sure we got the proper file name for the real test later on.
59317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59318  if test "x$test_shortpath" = x; then
59319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59321    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59322  fi
59323
59324  # Call helper function which possibly converts this using DOS-style short mode.
59325  # If so, the updated path is stored in $new_path.
59326
59327  input_path="$new_path"
59328  # Check if we need to convert this using DOS-style short mode. If the path
59329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59330  # take no chances and rewrite it.
59331  # Note: m4 eats our [], so we need to use [ and ] instead.
59332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59333  if test "x$has_forbidden_chars" != x; then
59334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59338      # Going to short mode and back again did indeed matter. Since short mode is
59339      # case insensitive, let's make it lowercase to improve readability.
59340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59341      # Now convert it back to Unix-style (cygpath)
59342      input_path=`$CYGPATH -u "$shortmode_path"`
59343      new_path="$input_path"
59344    fi
59345  fi
59346
59347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59348  if test "x$test_cygdrive_prefix" = x; then
59349    # As a simple fix, exclude /usr/bin since it's not a real path.
59350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59352      # a path prefixed by /cygdrive for fixpath to work.
59353      new_path="$CYGWIN_ROOT_PATH$input_path"
59354    fi
59355  fi
59356
59357
59358  if test "x$path" != "x$new_path"; then
59359    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59362  fi
59363
59364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59365
59366  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59367  has_colon=`$ECHO $path | $GREP ^.:`
59368  new_path="$path"
59369  if test "x$has_colon" = x; then
59370    # Not in mixed or Windows style, start by that.
59371    new_path=`cmd //c echo $path`
59372  fi
59373
59374
59375  input_path="$new_path"
59376  # Check if we need to convert this using DOS-style short mode. If the path
59377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59378  # take no chances and rewrite it.
59379  # Note: m4 eats our [], so we need to use [ and ] instead.
59380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59381  if test "x$has_forbidden_chars" != x; then
59382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59384  fi
59385
59386
59387  windows_path="$new_path"
59388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59389    unix_path=`$CYGPATH -u "$windows_path"`
59390    new_path="$unix_path"
59391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59393    new_path="$unix_path"
59394  fi
59395
59396  if test "x$path" != "x$new_path"; then
59397    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59399$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59400  fi
59401
59402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59404
59405    else
59406      # We're on a unix platform. Hooray! :)
59407      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59408      has_space=`$ECHO "$path" | $GREP " "`
59409      if test "x$has_space" != x; then
59410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59413      fi
59414
59415      # Use eval to expand a potential ~
59416      eval path="$path"
59417      if test ! -f "$path" && test ! -d "$path"; then
59418        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59419      fi
59420
59421      if test -d "$path"; then
59422        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59423      else
59424        dir="`$DIRNAME "$path"`"
59425        base="`$BASENAME "$path"`"
59426        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59427      fi
59428    fi
59429  fi
59430
59431
59432  # Only process if variable expands to non-empty
59433
59434  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59436
59437  # Input might be given as Windows format, start by converting to
59438  # unix format.
59439  path="$POTENTIAL_FREETYPE_LIB_PATH"
59440  new_path=`$CYGPATH -u "$path"`
59441
59442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59445  # "foo.exe" is OK but "foo" is an error.
59446  #
59447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59448  # It is also a way to make sure we got the proper file name for the real test later on.
59449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59450  if test "x$test_shortpath" = x; then
59451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59453    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59454  fi
59455
59456  # Call helper function which possibly converts this using DOS-style short mode.
59457  # If so, the updated path is stored in $new_path.
59458
59459  input_path="$new_path"
59460  # Check if we need to convert this using DOS-style short mode. If the path
59461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59462  # take no chances and rewrite it.
59463  # Note: m4 eats our [], so we need to use [ and ] instead.
59464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59465  if test "x$has_forbidden_chars" != x; then
59466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59470      # Going to short mode and back again did indeed matter. Since short mode is
59471      # case insensitive, let's make it lowercase to improve readability.
59472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59473      # Now convert it back to Unix-style (cygpath)
59474      input_path=`$CYGPATH -u "$shortmode_path"`
59475      new_path="$input_path"
59476    fi
59477  fi
59478
59479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59480  if test "x$test_cygdrive_prefix" = x; then
59481    # As a simple fix, exclude /usr/bin since it's not a real path.
59482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59484      # a path prefixed by /cygdrive for fixpath to work.
59485      new_path="$CYGWIN_ROOT_PATH$input_path"
59486    fi
59487  fi
59488
59489
59490  if test "x$path" != "x$new_path"; then
59491    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59494  fi
59495
59496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59497
59498  path="$POTENTIAL_FREETYPE_LIB_PATH"
59499  has_colon=`$ECHO $path | $GREP ^.:`
59500  new_path="$path"
59501  if test "x$has_colon" = x; then
59502    # Not in mixed or Windows style, start by that.
59503    new_path=`cmd //c echo $path`
59504  fi
59505
59506
59507  input_path="$new_path"
59508  # Check if we need to convert this using DOS-style short mode. If the path
59509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59510  # take no chances and rewrite it.
59511  # Note: m4 eats our [], so we need to use [ and ] instead.
59512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59513  if test "x$has_forbidden_chars" != x; then
59514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59516  fi
59517
59518
59519  windows_path="$new_path"
59520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59521    unix_path=`$CYGPATH -u "$windows_path"`
59522    new_path="$unix_path"
59523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59525    new_path="$unix_path"
59526  fi
59527
59528  if test "x$path" != "x$new_path"; then
59529    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59532  fi
59533
59534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59536
59537    else
59538      # We're on a unix platform. Hooray! :)
59539      path="$POTENTIAL_FREETYPE_LIB_PATH"
59540      has_space=`$ECHO "$path" | $GREP " "`
59541      if test "x$has_space" != x; then
59542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59545      fi
59546
59547      # Use eval to expand a potential ~
59548      eval path="$path"
59549      if test ! -f "$path" && test ! -d "$path"; then
59550        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59551      fi
59552
59553      if test -d "$path"; then
59554        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59555      else
59556        dir="`$DIRNAME "$path"`"
59557        base="`$BASENAME "$path"`"
59558        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59559      fi
59560    fi
59561  fi
59562
59563
59564    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59566$as_echo_n "checking for freetype includes... " >&6; }
59567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59568$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59569    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59571$as_echo_n "checking for freetype libraries... " >&6; }
59572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59573$as_echo "$FREETYPE_LIB_PATH" >&6; }
59574  fi
59575
59576            else
59577
59578  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59579  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59580  METHOD="well-known location"
59581
59582  # Let's start with an optimistic view of the world :-)
59583  FOUND_FREETYPE=yes
59584
59585  # First look for the canonical freetype main include file ft2build.h.
59586  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59587    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59588    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59589    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59590      # Fail.
59591      FOUND_FREETYPE=no
59592    fi
59593  fi
59594
59595  if test "x$FOUND_FREETYPE" = xyes; then
59596    # Include file found, let's continue the sanity check.
59597    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59598$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59599
59600    # Reset to default value
59601    FREETYPE_BASE_NAME=freetype
59602    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59603    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59604      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59605          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59606        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59607        # for the .6 version explicitly.
59608        FREETYPE_BASE_NAME=freetype.6
59609        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59610        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59611$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59612      else
59613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59614$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59615        FOUND_FREETYPE=no
59616      fi
59617    else
59618      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59619        # On Windows, we will need both .lib and .dll file.
59620        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59621          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59622$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59623          FOUND_FREETYPE=no
59624        fi
59625      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59626          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59627        # Found lib in isa dir, use that instead.
59628        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59629        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59630$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59631      fi
59632    fi
59633  fi
59634
59635  if test "x$FOUND_FREETYPE" = xyes; then
59636
59637  # Only process if variable expands to non-empty
59638
59639  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59641
59642  # Input might be given as Windows format, start by converting to
59643  # unix format.
59644  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59645  new_path=`$CYGPATH -u "$path"`
59646
59647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59650  # "foo.exe" is OK but "foo" is an error.
59651  #
59652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59653  # It is also a way to make sure we got the proper file name for the real test later on.
59654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59655  if test "x$test_shortpath" = x; then
59656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59658    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59659  fi
59660
59661  # Call helper function which possibly converts this using DOS-style short mode.
59662  # If so, the updated path is stored in $new_path.
59663
59664  input_path="$new_path"
59665  # Check if we need to convert this using DOS-style short mode. If the path
59666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59667  # take no chances and rewrite it.
59668  # Note: m4 eats our [], so we need to use [ and ] instead.
59669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59670  if test "x$has_forbidden_chars" != x; then
59671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59675      # Going to short mode and back again did indeed matter. Since short mode is
59676      # case insensitive, let's make it lowercase to improve readability.
59677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59678      # Now convert it back to Unix-style (cygpath)
59679      input_path=`$CYGPATH -u "$shortmode_path"`
59680      new_path="$input_path"
59681    fi
59682  fi
59683
59684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59685  if test "x$test_cygdrive_prefix" = x; then
59686    # As a simple fix, exclude /usr/bin since it's not a real path.
59687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59689      # a path prefixed by /cygdrive for fixpath to work.
59690      new_path="$CYGWIN_ROOT_PATH$input_path"
59691    fi
59692  fi
59693
59694
59695  if test "x$path" != "x$new_path"; then
59696    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59699  fi
59700
59701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59702
59703  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59704  has_colon=`$ECHO $path | $GREP ^.:`
59705  new_path="$path"
59706  if test "x$has_colon" = x; then
59707    # Not in mixed or Windows style, start by that.
59708    new_path=`cmd //c echo $path`
59709  fi
59710
59711
59712  input_path="$new_path"
59713  # Check if we need to convert this using DOS-style short mode. If the path
59714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59715  # take no chances and rewrite it.
59716  # Note: m4 eats our [], so we need to use [ and ] instead.
59717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59718  if test "x$has_forbidden_chars" != x; then
59719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59721  fi
59722
59723
59724  windows_path="$new_path"
59725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59726    unix_path=`$CYGPATH -u "$windows_path"`
59727    new_path="$unix_path"
59728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59730    new_path="$unix_path"
59731  fi
59732
59733  if test "x$path" != "x$new_path"; then
59734    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59737  fi
59738
59739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59741
59742    else
59743      # We're on a unix platform. Hooray! :)
59744      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59745      has_space=`$ECHO "$path" | $GREP " "`
59746      if test "x$has_space" != x; then
59747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59750      fi
59751
59752      # Use eval to expand a potential ~
59753      eval path="$path"
59754      if test ! -f "$path" && test ! -d "$path"; then
59755        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59756      fi
59757
59758      if test -d "$path"; then
59759        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59760      else
59761        dir="`$DIRNAME "$path"`"
59762        base="`$BASENAME "$path"`"
59763        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59764      fi
59765    fi
59766  fi
59767
59768
59769  # Only process if variable expands to non-empty
59770
59771  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59773
59774  # Input might be given as Windows format, start by converting to
59775  # unix format.
59776  path="$POTENTIAL_FREETYPE_LIB_PATH"
59777  new_path=`$CYGPATH -u "$path"`
59778
59779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59782  # "foo.exe" is OK but "foo" is an error.
59783  #
59784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59785  # It is also a way to make sure we got the proper file name for the real test later on.
59786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59787  if test "x$test_shortpath" = x; then
59788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59790    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59791  fi
59792
59793  # Call helper function which possibly converts this using DOS-style short mode.
59794  # If so, the updated path is stored in $new_path.
59795
59796  input_path="$new_path"
59797  # Check if we need to convert this using DOS-style short mode. If the path
59798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59799  # take no chances and rewrite it.
59800  # Note: m4 eats our [], so we need to use [ and ] instead.
59801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59802  if test "x$has_forbidden_chars" != x; then
59803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59807      # Going to short mode and back again did indeed matter. Since short mode is
59808      # case insensitive, let's make it lowercase to improve readability.
59809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59810      # Now convert it back to Unix-style (cygpath)
59811      input_path=`$CYGPATH -u "$shortmode_path"`
59812      new_path="$input_path"
59813    fi
59814  fi
59815
59816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59817  if test "x$test_cygdrive_prefix" = x; then
59818    # As a simple fix, exclude /usr/bin since it's not a real path.
59819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59821      # a path prefixed by /cygdrive for fixpath to work.
59822      new_path="$CYGWIN_ROOT_PATH$input_path"
59823    fi
59824  fi
59825
59826
59827  if test "x$path" != "x$new_path"; then
59828    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59830$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59831  fi
59832
59833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59834
59835  path="$POTENTIAL_FREETYPE_LIB_PATH"
59836  has_colon=`$ECHO $path | $GREP ^.:`
59837  new_path="$path"
59838  if test "x$has_colon" = x; then
59839    # Not in mixed or Windows style, start by that.
59840    new_path=`cmd //c echo $path`
59841  fi
59842
59843
59844  input_path="$new_path"
59845  # Check if we need to convert this using DOS-style short mode. If the path
59846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59847  # take no chances and rewrite it.
59848  # Note: m4 eats our [], so we need to use [ and ] instead.
59849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59850  if test "x$has_forbidden_chars" != x; then
59851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59853  fi
59854
59855
59856  windows_path="$new_path"
59857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59858    unix_path=`$CYGPATH -u "$windows_path"`
59859    new_path="$unix_path"
59860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59862    new_path="$unix_path"
59863  fi
59864
59865  if test "x$path" != "x$new_path"; then
59866    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59868$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59869  fi
59870
59871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59873
59874    else
59875      # We're on a unix platform. Hooray! :)
59876      path="$POTENTIAL_FREETYPE_LIB_PATH"
59877      has_space=`$ECHO "$path" | $GREP " "`
59878      if test "x$has_space" != x; then
59879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59880$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59881        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59882      fi
59883
59884      # Use eval to expand a potential ~
59885      eval path="$path"
59886      if test ! -f "$path" && test ! -d "$path"; then
59887        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59888      fi
59889
59890      if test -d "$path"; then
59891        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59892      else
59893        dir="`$DIRNAME "$path"`"
59894        base="`$BASENAME "$path"`"
59895        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59896      fi
59897    fi
59898  fi
59899
59900
59901    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59903$as_echo_n "checking for freetype includes... " >&6; }
59904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59905$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59906    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59908$as_echo_n "checking for freetype libraries... " >&6; }
59909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59910$as_echo "$FREETYPE_LIB_PATH" >&6; }
59911  fi
59912
59913            fi
59914            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59915                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59916              # Source is available, as a last resort try to build freetype in default location
59917
59918  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59919  BUILD_FREETYPE=yes
59920
59921  # Check if the freetype sources are acessible..
59922  if ! test -d $FREETYPE_SRC_PATH; then
59923    { $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
59924$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59925    BUILD_FREETYPE=no
59926  fi
59927  # ..and contain a vc2010 project file
59928  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59929  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59930    { $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
59931$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59932    BUILD_FREETYPE=no
59933  fi
59934  # Now check if configure found a version of 'msbuild.exe'
59935  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59936    { $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
59937$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;}
59938    BUILD_FREETYPE=no
59939  fi
59940
59941  # Ready to go..
59942  if test "x$BUILD_FREETYPE" = xyes; then
59943    # msbuild requires trailing slashes for output directories
59944    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59945    freetype_lib_path_unix="$freetype_lib_path"
59946    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59947
59948  unix_path="$vcxproj_path"
59949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59950    windows_path=`$CYGPATH -m "$unix_path"`
59951    vcxproj_path="$windows_path"
59952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59953    windows_path=`cmd //c echo $unix_path`
59954    vcxproj_path="$windows_path"
59955  fi
59956
59957
59958  unix_path="$freetype_lib_path"
59959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59960    windows_path=`$CYGPATH -m "$unix_path"`
59961    freetype_lib_path="$windows_path"
59962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59963    windows_path=`cmd //c echo $unix_path`
59964    freetype_lib_path="$windows_path"
59965  fi
59966
59967
59968  unix_path="$freetype_obj_path"
59969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59970    windows_path=`$CYGPATH -m "$unix_path"`
59971    freetype_obj_path="$windows_path"
59972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59973    windows_path=`cmd //c echo $unix_path`
59974    freetype_obj_path="$windows_path"
59975  fi
59976
59977    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59978      freetype_platform=x64
59979    else
59980      freetype_platform=win32
59981    fi
59982
59983    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59984    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59985    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59986    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59987    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59988$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59989
59990    # First we try to build the freetype.dll
59991    $ECHO -e "@echo off\n"\
59992        "$MSBUILD $vcxproj_path "\
59993        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59994        "/p:Configuration=\"Release Multithreaded\" "\
59995        "/p:Platform=$freetype_platform "\
59996        "/p:ConfigurationType=DynamicLibrary "\
59997        "/p:TargetName=freetype "\
59998        "/p:OutDir=\"$freetype_lib_path\" "\
59999        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60000    cmd /c freetype.bat
60001
60002    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60003      # If that succeeds we also build freetype.lib
60004      $ECHO -e "@echo off\n"\
60005          "$MSBUILD $vcxproj_path "\
60006          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60007          "/p:Configuration=\"Release Multithreaded\" "\
60008          "/p:Platform=$freetype_platform "\
60009          "/p:ConfigurationType=StaticLibrary "\
60010          "/p:TargetName=freetype "\
60011          "/p:OutDir=\"$freetype_lib_path\" "\
60012          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60013      cmd /c freetype.bat
60014
60015      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60016        # Once we build both, lib and dll, set freetype lib and include path appropriately
60017        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60018        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60019        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60020$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60021      else
60022        BUILD_FREETYPE=no
60023      fi
60024    else
60025      BUILD_FREETYPE=no
60026    fi
60027  fi
60028
60029              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60030
60031  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60032  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60033  METHOD="well-known location"
60034
60035  # Let's start with an optimistic view of the world :-)
60036  FOUND_FREETYPE=yes
60037
60038  # First look for the canonical freetype main include file ft2build.h.
60039  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60040    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60041    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60042    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60043      # Fail.
60044      FOUND_FREETYPE=no
60045    fi
60046  fi
60047
60048  if test "x$FOUND_FREETYPE" = xyes; then
60049    # Include file found, let's continue the sanity check.
60050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60051$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60052
60053    # Reset to default value
60054    FREETYPE_BASE_NAME=freetype
60055    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60056    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60057      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60058          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60059        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60060        # for the .6 version explicitly.
60061        FREETYPE_BASE_NAME=freetype.6
60062        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60063        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60064$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60065      else
60066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60067$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60068        FOUND_FREETYPE=no
60069      fi
60070    else
60071      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60072        # On Windows, we will need both .lib and .dll file.
60073        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60074          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60075$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60076          FOUND_FREETYPE=no
60077        fi
60078      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60080        # Found lib in isa dir, use that instead.
60081        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60082        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60083$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60084      fi
60085    fi
60086  fi
60087
60088  if test "x$FOUND_FREETYPE" = xyes; then
60089
60090  # Only process if variable expands to non-empty
60091
60092  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60094
60095  # Input might be given as Windows format, start by converting to
60096  # unix format.
60097  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60098  new_path=`$CYGPATH -u "$path"`
60099
60100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60103  # "foo.exe" is OK but "foo" is an error.
60104  #
60105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60106  # It is also a way to make sure we got the proper file name for the real test later on.
60107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60108  if test "x$test_shortpath" = x; then
60109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60111    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60112  fi
60113
60114  # Call helper function which possibly converts this using DOS-style short mode.
60115  # If so, the updated path is stored in $new_path.
60116
60117  input_path="$new_path"
60118  # Check if we need to convert this using DOS-style short mode. If the path
60119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60120  # take no chances and rewrite it.
60121  # Note: m4 eats our [], so we need to use [ and ] instead.
60122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60123  if test "x$has_forbidden_chars" != x; then
60124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60128      # Going to short mode and back again did indeed matter. Since short mode is
60129      # case insensitive, let's make it lowercase to improve readability.
60130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60131      # Now convert it back to Unix-style (cygpath)
60132      input_path=`$CYGPATH -u "$shortmode_path"`
60133      new_path="$input_path"
60134    fi
60135  fi
60136
60137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60138  if test "x$test_cygdrive_prefix" = x; then
60139    # As a simple fix, exclude /usr/bin since it's not a real path.
60140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60142      # a path prefixed by /cygdrive for fixpath to work.
60143      new_path="$CYGWIN_ROOT_PATH$input_path"
60144    fi
60145  fi
60146
60147
60148  if test "x$path" != "x$new_path"; then
60149    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60152  fi
60153
60154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60155
60156  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60157  has_colon=`$ECHO $path | $GREP ^.:`
60158  new_path="$path"
60159  if test "x$has_colon" = x; then
60160    # Not in mixed or Windows style, start by that.
60161    new_path=`cmd //c echo $path`
60162  fi
60163
60164
60165  input_path="$new_path"
60166  # Check if we need to convert this using DOS-style short mode. If the path
60167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60168  # take no chances and rewrite it.
60169  # Note: m4 eats our [], so we need to use [ and ] instead.
60170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60171  if test "x$has_forbidden_chars" != x; then
60172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60174  fi
60175
60176
60177  windows_path="$new_path"
60178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60179    unix_path=`$CYGPATH -u "$windows_path"`
60180    new_path="$unix_path"
60181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60183    new_path="$unix_path"
60184  fi
60185
60186  if test "x$path" != "x$new_path"; then
60187    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60190  fi
60191
60192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60194
60195    else
60196      # We're on a unix platform. Hooray! :)
60197      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60198      has_space=`$ECHO "$path" | $GREP " "`
60199      if test "x$has_space" != x; then
60200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60203      fi
60204
60205      # Use eval to expand a potential ~
60206      eval path="$path"
60207      if test ! -f "$path" && test ! -d "$path"; then
60208        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60209      fi
60210
60211      if test -d "$path"; then
60212        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60213      else
60214        dir="`$DIRNAME "$path"`"
60215        base="`$BASENAME "$path"`"
60216        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60217      fi
60218    fi
60219  fi
60220
60221
60222  # Only process if variable expands to non-empty
60223
60224  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60226
60227  # Input might be given as Windows format, start by converting to
60228  # unix format.
60229  path="$POTENTIAL_FREETYPE_LIB_PATH"
60230  new_path=`$CYGPATH -u "$path"`
60231
60232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60235  # "foo.exe" is OK but "foo" is an error.
60236  #
60237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60238  # It is also a way to make sure we got the proper file name for the real test later on.
60239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60240  if test "x$test_shortpath" = x; then
60241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60243    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60244  fi
60245
60246  # Call helper function which possibly converts this using DOS-style short mode.
60247  # If so, the updated path is stored in $new_path.
60248
60249  input_path="$new_path"
60250  # Check if we need to convert this using DOS-style short mode. If the path
60251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60252  # take no chances and rewrite it.
60253  # Note: m4 eats our [], so we need to use [ and ] instead.
60254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60255  if test "x$has_forbidden_chars" != x; then
60256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60260      # Going to short mode and back again did indeed matter. Since short mode is
60261      # case insensitive, let's make it lowercase to improve readability.
60262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60263      # Now convert it back to Unix-style (cygpath)
60264      input_path=`$CYGPATH -u "$shortmode_path"`
60265      new_path="$input_path"
60266    fi
60267  fi
60268
60269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60270  if test "x$test_cygdrive_prefix" = x; then
60271    # As a simple fix, exclude /usr/bin since it's not a real path.
60272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60274      # a path prefixed by /cygdrive for fixpath to work.
60275      new_path="$CYGWIN_ROOT_PATH$input_path"
60276    fi
60277  fi
60278
60279
60280  if test "x$path" != "x$new_path"; then
60281    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60284  fi
60285
60286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60287
60288  path="$POTENTIAL_FREETYPE_LIB_PATH"
60289  has_colon=`$ECHO $path | $GREP ^.:`
60290  new_path="$path"
60291  if test "x$has_colon" = x; then
60292    # Not in mixed or Windows style, start by that.
60293    new_path=`cmd //c echo $path`
60294  fi
60295
60296
60297  input_path="$new_path"
60298  # Check if we need to convert this using DOS-style short mode. If the path
60299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60300  # take no chances and rewrite it.
60301  # Note: m4 eats our [], so we need to use [ and ] instead.
60302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60303  if test "x$has_forbidden_chars" != x; then
60304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60306  fi
60307
60308
60309  windows_path="$new_path"
60310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60311    unix_path=`$CYGPATH -u "$windows_path"`
60312    new_path="$unix_path"
60313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60315    new_path="$unix_path"
60316  fi
60317
60318  if test "x$path" != "x$new_path"; then
60319    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60322  fi
60323
60324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60326
60327    else
60328      # We're on a unix platform. Hooray! :)
60329      path="$POTENTIAL_FREETYPE_LIB_PATH"
60330      has_space=`$ECHO "$path" | $GREP " "`
60331      if test "x$has_space" != x; then
60332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60335      fi
60336
60337      # Use eval to expand a potential ~
60338      eval path="$path"
60339      if test ! -f "$path" && test ! -d "$path"; then
60340        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60341      fi
60342
60343      if test -d "$path"; then
60344        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60345      else
60346        dir="`$DIRNAME "$path"`"
60347        base="`$BASENAME "$path"`"
60348        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60349      fi
60350    fi
60351  fi
60352
60353
60354    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60356$as_echo_n "checking for freetype includes... " >&6; }
60357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60358$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60359    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60361$as_echo_n "checking for freetype libraries... " >&6; }
60362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60363$as_echo "$FREETYPE_LIB_PATH" >&6; }
60364  fi
60365
60366              else
60367
60368  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60369  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60370  METHOD="well-known location"
60371
60372  # Let's start with an optimistic view of the world :-)
60373  FOUND_FREETYPE=yes
60374
60375  # First look for the canonical freetype main include file ft2build.h.
60376  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60377    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60378    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60379    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60380      # Fail.
60381      FOUND_FREETYPE=no
60382    fi
60383  fi
60384
60385  if test "x$FOUND_FREETYPE" = xyes; then
60386    # Include file found, let's continue the sanity check.
60387    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60388$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60389
60390    # Reset to default value
60391    FREETYPE_BASE_NAME=freetype
60392    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60393    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60394      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60395          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60396        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60397        # for the .6 version explicitly.
60398        FREETYPE_BASE_NAME=freetype.6
60399        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60400        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60401$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60402      else
60403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60404$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60405        FOUND_FREETYPE=no
60406      fi
60407    else
60408      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60409        # On Windows, we will need both .lib and .dll file.
60410        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60411          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60412$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60413          FOUND_FREETYPE=no
60414        fi
60415      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60416          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60417        # Found lib in isa dir, use that instead.
60418        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60419        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60420$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60421      fi
60422    fi
60423  fi
60424
60425  if test "x$FOUND_FREETYPE" = xyes; then
60426
60427  # Only process if variable expands to non-empty
60428
60429  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60431
60432  # Input might be given as Windows format, start by converting to
60433  # unix format.
60434  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60435  new_path=`$CYGPATH -u "$path"`
60436
60437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60440  # "foo.exe" is OK but "foo" is an error.
60441  #
60442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60443  # It is also a way to make sure we got the proper file name for the real test later on.
60444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60445  if test "x$test_shortpath" = x; then
60446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60448    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60449  fi
60450
60451  # Call helper function which possibly converts this using DOS-style short mode.
60452  # If so, the updated path is stored in $new_path.
60453
60454  input_path="$new_path"
60455  # Check if we need to convert this using DOS-style short mode. If the path
60456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60457  # take no chances and rewrite it.
60458  # Note: m4 eats our [], so we need to use [ and ] instead.
60459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60460  if test "x$has_forbidden_chars" != x; then
60461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60465      # Going to short mode and back again did indeed matter. Since short mode is
60466      # case insensitive, let's make it lowercase to improve readability.
60467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60468      # Now convert it back to Unix-style (cygpath)
60469      input_path=`$CYGPATH -u "$shortmode_path"`
60470      new_path="$input_path"
60471    fi
60472  fi
60473
60474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60475  if test "x$test_cygdrive_prefix" = x; then
60476    # As a simple fix, exclude /usr/bin since it's not a real path.
60477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60479      # a path prefixed by /cygdrive for fixpath to work.
60480      new_path="$CYGWIN_ROOT_PATH$input_path"
60481    fi
60482  fi
60483
60484
60485  if test "x$path" != "x$new_path"; then
60486    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60489  fi
60490
60491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60492
60493  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60494  has_colon=`$ECHO $path | $GREP ^.:`
60495  new_path="$path"
60496  if test "x$has_colon" = x; then
60497    # Not in mixed or Windows style, start by that.
60498    new_path=`cmd //c echo $path`
60499  fi
60500
60501
60502  input_path="$new_path"
60503  # Check if we need to convert this using DOS-style short mode. If the path
60504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60505  # take no chances and rewrite it.
60506  # Note: m4 eats our [], so we need to use [ and ] instead.
60507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60508  if test "x$has_forbidden_chars" != x; then
60509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60511  fi
60512
60513
60514  windows_path="$new_path"
60515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60516    unix_path=`$CYGPATH -u "$windows_path"`
60517    new_path="$unix_path"
60518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60520    new_path="$unix_path"
60521  fi
60522
60523  if test "x$path" != "x$new_path"; then
60524    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60527  fi
60528
60529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60531
60532    else
60533      # We're on a unix platform. Hooray! :)
60534      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60535      has_space=`$ECHO "$path" | $GREP " "`
60536      if test "x$has_space" != x; then
60537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60540      fi
60541
60542      # Use eval to expand a potential ~
60543      eval path="$path"
60544      if test ! -f "$path" && test ! -d "$path"; then
60545        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60546      fi
60547
60548      if test -d "$path"; then
60549        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60550      else
60551        dir="`$DIRNAME "$path"`"
60552        base="`$BASENAME "$path"`"
60553        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60554      fi
60555    fi
60556  fi
60557
60558
60559  # Only process if variable expands to non-empty
60560
60561  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60563
60564  # Input might be given as Windows format, start by converting to
60565  # unix format.
60566  path="$POTENTIAL_FREETYPE_LIB_PATH"
60567  new_path=`$CYGPATH -u "$path"`
60568
60569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60572  # "foo.exe" is OK but "foo" is an error.
60573  #
60574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60575  # It is also a way to make sure we got the proper file name for the real test later on.
60576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60577  if test "x$test_shortpath" = x; then
60578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60579$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60580    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60581  fi
60582
60583  # Call helper function which possibly converts this using DOS-style short mode.
60584  # If so, the updated path is stored in $new_path.
60585
60586  input_path="$new_path"
60587  # Check if we need to convert this using DOS-style short mode. If the path
60588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60589  # take no chances and rewrite it.
60590  # Note: m4 eats our [], so we need to use [ and ] instead.
60591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60592  if test "x$has_forbidden_chars" != x; then
60593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60597      # Going to short mode and back again did indeed matter. Since short mode is
60598      # case insensitive, let's make it lowercase to improve readability.
60599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60600      # Now convert it back to Unix-style (cygpath)
60601      input_path=`$CYGPATH -u "$shortmode_path"`
60602      new_path="$input_path"
60603    fi
60604  fi
60605
60606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60607  if test "x$test_cygdrive_prefix" = x; then
60608    # As a simple fix, exclude /usr/bin since it's not a real path.
60609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60611      # a path prefixed by /cygdrive for fixpath to work.
60612      new_path="$CYGWIN_ROOT_PATH$input_path"
60613    fi
60614  fi
60615
60616
60617  if test "x$path" != "x$new_path"; then
60618    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60621  fi
60622
60623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60624
60625  path="$POTENTIAL_FREETYPE_LIB_PATH"
60626  has_colon=`$ECHO $path | $GREP ^.:`
60627  new_path="$path"
60628  if test "x$has_colon" = x; then
60629    # Not in mixed or Windows style, start by that.
60630    new_path=`cmd //c echo $path`
60631  fi
60632
60633
60634  input_path="$new_path"
60635  # Check if we need to convert this using DOS-style short mode. If the path
60636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60637  # take no chances and rewrite it.
60638  # Note: m4 eats our [], so we need to use [ and ] instead.
60639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60640  if test "x$has_forbidden_chars" != x; then
60641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60643  fi
60644
60645
60646  windows_path="$new_path"
60647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60648    unix_path=`$CYGPATH -u "$windows_path"`
60649    new_path="$unix_path"
60650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60652    new_path="$unix_path"
60653  fi
60654
60655  if test "x$path" != "x$new_path"; then
60656    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60659  fi
60660
60661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60663
60664    else
60665      # We're on a unix platform. Hooray! :)
60666      path="$POTENTIAL_FREETYPE_LIB_PATH"
60667      has_space=`$ECHO "$path" | $GREP " "`
60668      if test "x$has_space" != x; then
60669        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60671        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60672      fi
60673
60674      # Use eval to expand a potential ~
60675      eval path="$path"
60676      if test ! -f "$path" && test ! -d "$path"; then
60677        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60678      fi
60679
60680      if test -d "$path"; then
60681        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60682      else
60683        dir="`$DIRNAME "$path"`"
60684        base="`$BASENAME "$path"`"
60685        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60686      fi
60687    fi
60688  fi
60689
60690
60691    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60693$as_echo_n "checking for freetype includes... " >&6; }
60694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60695$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60696    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60698$as_echo_n "checking for freetype libraries... " >&6; }
60699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60700$as_echo "$FREETYPE_LIB_PATH" >&6; }
60701  fi
60702
60703              fi
60704            fi
60705          fi
60706        else
60707          FREETYPE_BASE_DIR="$SYSROOT/usr"
60708
60709  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60710  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60711  METHOD="well-known location"
60712
60713  # Let's start with an optimistic view of the world :-)
60714  FOUND_FREETYPE=yes
60715
60716  # First look for the canonical freetype main include file ft2build.h.
60717  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60718    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60719    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60720    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60721      # Fail.
60722      FOUND_FREETYPE=no
60723    fi
60724  fi
60725
60726  if test "x$FOUND_FREETYPE" = xyes; then
60727    # Include file found, let's continue the sanity check.
60728    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60729$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60730
60731    # Reset to default value
60732    FREETYPE_BASE_NAME=freetype
60733    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60734    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60735      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60736          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60737        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60738        # for the .6 version explicitly.
60739        FREETYPE_BASE_NAME=freetype.6
60740        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60741        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60742$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60743      else
60744        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60745$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60746        FOUND_FREETYPE=no
60747      fi
60748    else
60749      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60750        # On Windows, we will need both .lib and .dll file.
60751        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60752          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60753$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60754          FOUND_FREETYPE=no
60755        fi
60756      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60758        # Found lib in isa dir, use that instead.
60759        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60760        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60761$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60762      fi
60763    fi
60764  fi
60765
60766  if test "x$FOUND_FREETYPE" = xyes; then
60767
60768  # Only process if variable expands to non-empty
60769
60770  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60772
60773  # Input might be given as Windows format, start by converting to
60774  # unix format.
60775  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60776  new_path=`$CYGPATH -u "$path"`
60777
60778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60781  # "foo.exe" is OK but "foo" is an error.
60782  #
60783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60784  # It is also a way to make sure we got the proper file name for the real test later on.
60785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60786  if test "x$test_shortpath" = x; then
60787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60788$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60789    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60790  fi
60791
60792  # Call helper function which possibly converts this using DOS-style short mode.
60793  # If so, the updated path is stored in $new_path.
60794
60795  input_path="$new_path"
60796  # Check if we need to convert this using DOS-style short mode. If the path
60797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60798  # take no chances and rewrite it.
60799  # Note: m4 eats our [], so we need to use [ and ] instead.
60800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60801  if test "x$has_forbidden_chars" != x; then
60802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60806      # Going to short mode and back again did indeed matter. Since short mode is
60807      # case insensitive, let's make it lowercase to improve readability.
60808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60809      # Now convert it back to Unix-style (cygpath)
60810      input_path=`$CYGPATH -u "$shortmode_path"`
60811      new_path="$input_path"
60812    fi
60813  fi
60814
60815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60816  if test "x$test_cygdrive_prefix" = x; then
60817    # As a simple fix, exclude /usr/bin since it's not a real path.
60818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60820      # a path prefixed by /cygdrive for fixpath to work.
60821      new_path="$CYGWIN_ROOT_PATH$input_path"
60822    fi
60823  fi
60824
60825
60826  if test "x$path" != "x$new_path"; then
60827    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60830  fi
60831
60832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60833
60834  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60835  has_colon=`$ECHO $path | $GREP ^.:`
60836  new_path="$path"
60837  if test "x$has_colon" = x; then
60838    # Not in mixed or Windows style, start by that.
60839    new_path=`cmd //c echo $path`
60840  fi
60841
60842
60843  input_path="$new_path"
60844  # Check if we need to convert this using DOS-style short mode. If the path
60845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60846  # take no chances and rewrite it.
60847  # Note: m4 eats our [], so we need to use [ and ] instead.
60848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60849  if test "x$has_forbidden_chars" != x; then
60850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60852  fi
60853
60854
60855  windows_path="$new_path"
60856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60857    unix_path=`$CYGPATH -u "$windows_path"`
60858    new_path="$unix_path"
60859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60861    new_path="$unix_path"
60862  fi
60863
60864  if test "x$path" != "x$new_path"; then
60865    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60867$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60868  fi
60869
60870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60872
60873    else
60874      # We're on a unix platform. Hooray! :)
60875      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60876      has_space=`$ECHO "$path" | $GREP " "`
60877      if test "x$has_space" != x; then
60878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60881      fi
60882
60883      # Use eval to expand a potential ~
60884      eval path="$path"
60885      if test ! -f "$path" && test ! -d "$path"; then
60886        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60887      fi
60888
60889      if test -d "$path"; then
60890        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60891      else
60892        dir="`$DIRNAME "$path"`"
60893        base="`$BASENAME "$path"`"
60894        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60895      fi
60896    fi
60897  fi
60898
60899
60900  # Only process if variable expands to non-empty
60901
60902  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60904
60905  # Input might be given as Windows format, start by converting to
60906  # unix format.
60907  path="$POTENTIAL_FREETYPE_LIB_PATH"
60908  new_path=`$CYGPATH -u "$path"`
60909
60910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60913  # "foo.exe" is OK but "foo" is an error.
60914  #
60915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60916  # It is also a way to make sure we got the proper file name for the real test later on.
60917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60918  if test "x$test_shortpath" = x; then
60919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60921    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60922  fi
60923
60924  # Call helper function which possibly converts this using DOS-style short mode.
60925  # If so, the updated path is stored in $new_path.
60926
60927  input_path="$new_path"
60928  # Check if we need to convert this using DOS-style short mode. If the path
60929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60930  # take no chances and rewrite it.
60931  # Note: m4 eats our [], so we need to use [ and ] instead.
60932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60933  if test "x$has_forbidden_chars" != x; then
60934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60938      # Going to short mode and back again did indeed matter. Since short mode is
60939      # case insensitive, let's make it lowercase to improve readability.
60940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60941      # Now convert it back to Unix-style (cygpath)
60942      input_path=`$CYGPATH -u "$shortmode_path"`
60943      new_path="$input_path"
60944    fi
60945  fi
60946
60947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60948  if test "x$test_cygdrive_prefix" = x; then
60949    # As a simple fix, exclude /usr/bin since it's not a real path.
60950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60952      # a path prefixed by /cygdrive for fixpath to work.
60953      new_path="$CYGWIN_ROOT_PATH$input_path"
60954    fi
60955  fi
60956
60957
60958  if test "x$path" != "x$new_path"; then
60959    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60962  fi
60963
60964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60965
60966  path="$POTENTIAL_FREETYPE_LIB_PATH"
60967  has_colon=`$ECHO $path | $GREP ^.:`
60968  new_path="$path"
60969  if test "x$has_colon" = x; then
60970    # Not in mixed or Windows style, start by that.
60971    new_path=`cmd //c echo $path`
60972  fi
60973
60974
60975  input_path="$new_path"
60976  # Check if we need to convert this using DOS-style short mode. If the path
60977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60978  # take no chances and rewrite it.
60979  # Note: m4 eats our [], so we need to use [ and ] instead.
60980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60981  if test "x$has_forbidden_chars" != x; then
60982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60984  fi
60985
60986
60987  windows_path="$new_path"
60988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60989    unix_path=`$CYGPATH -u "$windows_path"`
60990    new_path="$unix_path"
60991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60993    new_path="$unix_path"
60994  fi
60995
60996  if test "x$path" != "x$new_path"; then
60997    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60999$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61000  fi
61001
61002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61004
61005    else
61006      # We're on a unix platform. Hooray! :)
61007      path="$POTENTIAL_FREETYPE_LIB_PATH"
61008      has_space=`$ECHO "$path" | $GREP " "`
61009      if test "x$has_space" != x; then
61010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61012        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61013      fi
61014
61015      # Use eval to expand a potential ~
61016      eval path="$path"
61017      if test ! -f "$path" && test ! -d "$path"; then
61018        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61019      fi
61020
61021      if test -d "$path"; then
61022        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61023      else
61024        dir="`$DIRNAME "$path"`"
61025        base="`$BASENAME "$path"`"
61026        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61027      fi
61028    fi
61029  fi
61030
61031
61032    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61034$as_echo_n "checking for freetype includes... " >&6; }
61035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61036$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61037    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61039$as_echo_n "checking for freetype libraries... " >&6; }
61040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61041$as_echo "$FREETYPE_LIB_PATH" >&6; }
61042  fi
61043
61044
61045          if test "x$FOUND_FREETYPE" != xyes; then
61046            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61047
61048  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61049  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61050  METHOD="well-known location"
61051
61052  # Let's start with an optimistic view of the world :-)
61053  FOUND_FREETYPE=yes
61054
61055  # First look for the canonical freetype main include file ft2build.h.
61056  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61057    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61058    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61059    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61060      # Fail.
61061      FOUND_FREETYPE=no
61062    fi
61063  fi
61064
61065  if test "x$FOUND_FREETYPE" = xyes; then
61066    # Include file found, let's continue the sanity check.
61067    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61068$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61069
61070    # Reset to default value
61071    FREETYPE_BASE_NAME=freetype
61072    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61073    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61074      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61075          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61076        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61077        # for the .6 version explicitly.
61078        FREETYPE_BASE_NAME=freetype.6
61079        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61080        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61081$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61082      else
61083        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61084$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61085        FOUND_FREETYPE=no
61086      fi
61087    else
61088      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61089        # On Windows, we will need both .lib and .dll file.
61090        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61091          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61092$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61093          FOUND_FREETYPE=no
61094        fi
61095      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61096          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61097        # Found lib in isa dir, use that instead.
61098        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61099        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61100$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61101      fi
61102    fi
61103  fi
61104
61105  if test "x$FOUND_FREETYPE" = xyes; then
61106
61107  # Only process if variable expands to non-empty
61108
61109  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61111
61112  # Input might be given as Windows format, start by converting to
61113  # unix format.
61114  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61115  new_path=`$CYGPATH -u "$path"`
61116
61117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61120  # "foo.exe" is OK but "foo" is an error.
61121  #
61122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61123  # It is also a way to make sure we got the proper file name for the real test later on.
61124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61125  if test "x$test_shortpath" = x; then
61126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61128    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61129  fi
61130
61131  # Call helper function which possibly converts this using DOS-style short mode.
61132  # If so, the updated path is stored in $new_path.
61133
61134  input_path="$new_path"
61135  # Check if we need to convert this using DOS-style short mode. If the path
61136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61137  # take no chances and rewrite it.
61138  # Note: m4 eats our [], so we need to use [ and ] instead.
61139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61140  if test "x$has_forbidden_chars" != x; then
61141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61145      # Going to short mode and back again did indeed matter. Since short mode is
61146      # case insensitive, let's make it lowercase to improve readability.
61147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61148      # Now convert it back to Unix-style (cygpath)
61149      input_path=`$CYGPATH -u "$shortmode_path"`
61150      new_path="$input_path"
61151    fi
61152  fi
61153
61154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61155  if test "x$test_cygdrive_prefix" = x; then
61156    # As a simple fix, exclude /usr/bin since it's not a real path.
61157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61159      # a path prefixed by /cygdrive for fixpath to work.
61160      new_path="$CYGWIN_ROOT_PATH$input_path"
61161    fi
61162  fi
61163
61164
61165  if test "x$path" != "x$new_path"; then
61166    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61169  fi
61170
61171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61172
61173  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61174  has_colon=`$ECHO $path | $GREP ^.:`
61175  new_path="$path"
61176  if test "x$has_colon" = x; then
61177    # Not in mixed or Windows style, start by that.
61178    new_path=`cmd //c echo $path`
61179  fi
61180
61181
61182  input_path="$new_path"
61183  # Check if we need to convert this using DOS-style short mode. If the path
61184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61185  # take no chances and rewrite it.
61186  # Note: m4 eats our [], so we need to use [ and ] instead.
61187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61188  if test "x$has_forbidden_chars" != x; then
61189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61191  fi
61192
61193
61194  windows_path="$new_path"
61195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61196    unix_path=`$CYGPATH -u "$windows_path"`
61197    new_path="$unix_path"
61198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61200    new_path="$unix_path"
61201  fi
61202
61203  if test "x$path" != "x$new_path"; then
61204    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61207  fi
61208
61209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61211
61212    else
61213      # We're on a unix platform. Hooray! :)
61214      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61215      has_space=`$ECHO "$path" | $GREP " "`
61216      if test "x$has_space" != x; then
61217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61220      fi
61221
61222      # Use eval to expand a potential ~
61223      eval path="$path"
61224      if test ! -f "$path" && test ! -d "$path"; then
61225        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61226      fi
61227
61228      if test -d "$path"; then
61229        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61230      else
61231        dir="`$DIRNAME "$path"`"
61232        base="`$BASENAME "$path"`"
61233        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61234      fi
61235    fi
61236  fi
61237
61238
61239  # Only process if variable expands to non-empty
61240
61241  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61243
61244  # Input might be given as Windows format, start by converting to
61245  # unix format.
61246  path="$POTENTIAL_FREETYPE_LIB_PATH"
61247  new_path=`$CYGPATH -u "$path"`
61248
61249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61252  # "foo.exe" is OK but "foo" is an error.
61253  #
61254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61255  # It is also a way to make sure we got the proper file name for the real test later on.
61256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61257  if test "x$test_shortpath" = x; then
61258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61260    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61261  fi
61262
61263  # Call helper function which possibly converts this using DOS-style short mode.
61264  # If so, the updated path is stored in $new_path.
61265
61266  input_path="$new_path"
61267  # Check if we need to convert this using DOS-style short mode. If the path
61268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61269  # take no chances and rewrite it.
61270  # Note: m4 eats our [], so we need to use [ and ] instead.
61271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61272  if test "x$has_forbidden_chars" != x; then
61273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61277      # Going to short mode and back again did indeed matter. Since short mode is
61278      # case insensitive, let's make it lowercase to improve readability.
61279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61280      # Now convert it back to Unix-style (cygpath)
61281      input_path=`$CYGPATH -u "$shortmode_path"`
61282      new_path="$input_path"
61283    fi
61284  fi
61285
61286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61287  if test "x$test_cygdrive_prefix" = x; then
61288    # As a simple fix, exclude /usr/bin since it's not a real path.
61289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61291      # a path prefixed by /cygdrive for fixpath to work.
61292      new_path="$CYGWIN_ROOT_PATH$input_path"
61293    fi
61294  fi
61295
61296
61297  if test "x$path" != "x$new_path"; then
61298    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61301  fi
61302
61303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61304
61305  path="$POTENTIAL_FREETYPE_LIB_PATH"
61306  has_colon=`$ECHO $path | $GREP ^.:`
61307  new_path="$path"
61308  if test "x$has_colon" = x; then
61309    # Not in mixed or Windows style, start by that.
61310    new_path=`cmd //c echo $path`
61311  fi
61312
61313
61314  input_path="$new_path"
61315  # Check if we need to convert this using DOS-style short mode. If the path
61316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61317  # take no chances and rewrite it.
61318  # Note: m4 eats our [], so we need to use [ and ] instead.
61319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61320  if test "x$has_forbidden_chars" != x; then
61321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61323  fi
61324
61325
61326  windows_path="$new_path"
61327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61328    unix_path=`$CYGPATH -u "$windows_path"`
61329    new_path="$unix_path"
61330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61332    new_path="$unix_path"
61333  fi
61334
61335  if test "x$path" != "x$new_path"; then
61336    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61339  fi
61340
61341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61343
61344    else
61345      # We're on a unix platform. Hooray! :)
61346      path="$POTENTIAL_FREETYPE_LIB_PATH"
61347      has_space=`$ECHO "$path" | $GREP " "`
61348      if test "x$has_space" != x; then
61349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61351        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61352      fi
61353
61354      # Use eval to expand a potential ~
61355      eval path="$path"
61356      if test ! -f "$path" && test ! -d "$path"; then
61357        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61358      fi
61359
61360      if test -d "$path"; then
61361        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61362      else
61363        dir="`$DIRNAME "$path"`"
61364        base="`$BASENAME "$path"`"
61365        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61366      fi
61367    fi
61368  fi
61369
61370
61371    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61373$as_echo_n "checking for freetype includes... " >&6; }
61374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61375$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61376    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61378$as_echo_n "checking for freetype libraries... " >&6; }
61379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61380$as_echo "$FREETYPE_LIB_PATH" >&6; }
61381  fi
61382
61383          fi
61384          if test "x$FOUND_FREETYPE" != xyes; then
61385            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61386
61387  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61388  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61389  METHOD="well-known location"
61390
61391  # Let's start with an optimistic view of the world :-)
61392  FOUND_FREETYPE=yes
61393
61394  # First look for the canonical freetype main include file ft2build.h.
61395  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61396    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61397    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61398    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61399      # Fail.
61400      FOUND_FREETYPE=no
61401    fi
61402  fi
61403
61404  if test "x$FOUND_FREETYPE" = xyes; then
61405    # Include file found, let's continue the sanity check.
61406    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61407$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61408
61409    # Reset to default value
61410    FREETYPE_BASE_NAME=freetype
61411    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61412    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61413      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61414          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61415        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61416        # for the .6 version explicitly.
61417        FREETYPE_BASE_NAME=freetype.6
61418        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61419        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61420$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61421      else
61422        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61423$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61424        FOUND_FREETYPE=no
61425      fi
61426    else
61427      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61428        # On Windows, we will need both .lib and .dll file.
61429        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61430          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61431$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61432          FOUND_FREETYPE=no
61433        fi
61434      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61435          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61436        # Found lib in isa dir, use that instead.
61437        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61438        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61439$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61440      fi
61441    fi
61442  fi
61443
61444  if test "x$FOUND_FREETYPE" = xyes; then
61445
61446  # Only process if variable expands to non-empty
61447
61448  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61450
61451  # Input might be given as Windows format, start by converting to
61452  # unix format.
61453  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61454  new_path=`$CYGPATH -u "$path"`
61455
61456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61459  # "foo.exe" is OK but "foo" is an error.
61460  #
61461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61462  # It is also a way to make sure we got the proper file name for the real test later on.
61463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61464  if test "x$test_shortpath" = x; then
61465    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61466$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61467    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61468  fi
61469
61470  # Call helper function which possibly converts this using DOS-style short mode.
61471  # If so, the updated path is stored in $new_path.
61472
61473  input_path="$new_path"
61474  # Check if we need to convert this using DOS-style short mode. If the path
61475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61476  # take no chances and rewrite it.
61477  # Note: m4 eats our [], so we need to use [ and ] instead.
61478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61479  if test "x$has_forbidden_chars" != x; then
61480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61484      # Going to short mode and back again did indeed matter. Since short mode is
61485      # case insensitive, let's make it lowercase to improve readability.
61486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61487      # Now convert it back to Unix-style (cygpath)
61488      input_path=`$CYGPATH -u "$shortmode_path"`
61489      new_path="$input_path"
61490    fi
61491  fi
61492
61493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61494  if test "x$test_cygdrive_prefix" = x; then
61495    # As a simple fix, exclude /usr/bin since it's not a real path.
61496    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61498      # a path prefixed by /cygdrive for fixpath to work.
61499      new_path="$CYGWIN_ROOT_PATH$input_path"
61500    fi
61501  fi
61502
61503
61504  if test "x$path" != "x$new_path"; then
61505    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61507$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61508  fi
61509
61510    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61511
61512  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61513  has_colon=`$ECHO $path | $GREP ^.:`
61514  new_path="$path"
61515  if test "x$has_colon" = x; then
61516    # Not in mixed or Windows style, start by that.
61517    new_path=`cmd //c echo $path`
61518  fi
61519
61520
61521  input_path="$new_path"
61522  # Check if we need to convert this using DOS-style short mode. If the path
61523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61524  # take no chances and rewrite it.
61525  # Note: m4 eats our [], so we need to use [ and ] instead.
61526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61527  if test "x$has_forbidden_chars" != x; then
61528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61530  fi
61531
61532
61533  windows_path="$new_path"
61534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61535    unix_path=`$CYGPATH -u "$windows_path"`
61536    new_path="$unix_path"
61537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61539    new_path="$unix_path"
61540  fi
61541
61542  if test "x$path" != "x$new_path"; then
61543    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61545$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61546  fi
61547
61548  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61549  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61550
61551    else
61552      # We're on a unix platform. Hooray! :)
61553      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61554      has_space=`$ECHO "$path" | $GREP " "`
61555      if test "x$has_space" != x; then
61556        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61557$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61558        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61559      fi
61560
61561      # Use eval to expand a potential ~
61562      eval path="$path"
61563      if test ! -f "$path" && test ! -d "$path"; then
61564        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61565      fi
61566
61567      if test -d "$path"; then
61568        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61569      else
61570        dir="`$DIRNAME "$path"`"
61571        base="`$BASENAME "$path"`"
61572        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61573      fi
61574    fi
61575  fi
61576
61577
61578  # Only process if variable expands to non-empty
61579
61580  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61582
61583  # Input might be given as Windows format, start by converting to
61584  # unix format.
61585  path="$POTENTIAL_FREETYPE_LIB_PATH"
61586  new_path=`$CYGPATH -u "$path"`
61587
61588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61591  # "foo.exe" is OK but "foo" is an error.
61592  #
61593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61594  # It is also a way to make sure we got the proper file name for the real test later on.
61595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61596  if test "x$test_shortpath" = x; then
61597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61598$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61599    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61600  fi
61601
61602  # Call helper function which possibly converts this using DOS-style short mode.
61603  # If so, the updated path is stored in $new_path.
61604
61605  input_path="$new_path"
61606  # Check if we need to convert this using DOS-style short mode. If the path
61607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61608  # take no chances and rewrite it.
61609  # Note: m4 eats our [], so we need to use [ and ] instead.
61610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61611  if test "x$has_forbidden_chars" != x; then
61612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61616      # Going to short mode and back again did indeed matter. Since short mode is
61617      # case insensitive, let's make it lowercase to improve readability.
61618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61619      # Now convert it back to Unix-style (cygpath)
61620      input_path=`$CYGPATH -u "$shortmode_path"`
61621      new_path="$input_path"
61622    fi
61623  fi
61624
61625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61626  if test "x$test_cygdrive_prefix" = x; then
61627    # As a simple fix, exclude /usr/bin since it's not a real path.
61628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61630      # a path prefixed by /cygdrive for fixpath to work.
61631      new_path="$CYGWIN_ROOT_PATH$input_path"
61632    fi
61633  fi
61634
61635
61636  if test "x$path" != "x$new_path"; then
61637    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61639$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61640  fi
61641
61642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61643
61644  path="$POTENTIAL_FREETYPE_LIB_PATH"
61645  has_colon=`$ECHO $path | $GREP ^.:`
61646  new_path="$path"
61647  if test "x$has_colon" = x; then
61648    # Not in mixed or Windows style, start by that.
61649    new_path=`cmd //c echo $path`
61650  fi
61651
61652
61653  input_path="$new_path"
61654  # Check if we need to convert this using DOS-style short mode. If the path
61655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61656  # take no chances and rewrite it.
61657  # Note: m4 eats our [], so we need to use [ and ] instead.
61658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61659  if test "x$has_forbidden_chars" != x; then
61660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61662  fi
61663
61664
61665  windows_path="$new_path"
61666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61667    unix_path=`$CYGPATH -u "$windows_path"`
61668    new_path="$unix_path"
61669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61671    new_path="$unix_path"
61672  fi
61673
61674  if test "x$path" != "x$new_path"; then
61675    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61677$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61678  fi
61679
61680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61682
61683    else
61684      # We're on a unix platform. Hooray! :)
61685      path="$POTENTIAL_FREETYPE_LIB_PATH"
61686      has_space=`$ECHO "$path" | $GREP " "`
61687      if test "x$has_space" != x; then
61688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61689$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61691      fi
61692
61693      # Use eval to expand a potential ~
61694      eval path="$path"
61695      if test ! -f "$path" && test ! -d "$path"; then
61696        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61697      fi
61698
61699      if test -d "$path"; then
61700        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61701      else
61702        dir="`$DIRNAME "$path"`"
61703        base="`$BASENAME "$path"`"
61704        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61705      fi
61706    fi
61707  fi
61708
61709
61710    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61712$as_echo_n "checking for freetype includes... " >&6; }
61713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61714$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61715    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61717$as_echo_n "checking for freetype libraries... " >&6; }
61718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61719$as_echo "$FREETYPE_LIB_PATH" >&6; }
61720  fi
61721
61722          fi
61723
61724          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61725            if test "x$FOUND_FREETYPE" != xyes; then
61726              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61727              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61728
61729  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61730  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61731  METHOD="well-known location"
61732
61733  # Let's start with an optimistic view of the world :-)
61734  FOUND_FREETYPE=yes
61735
61736  # First look for the canonical freetype main include file ft2build.h.
61737  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61738    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61739    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61740    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61741      # Fail.
61742      FOUND_FREETYPE=no
61743    fi
61744  fi
61745
61746  if test "x$FOUND_FREETYPE" = xyes; then
61747    # Include file found, let's continue the sanity check.
61748    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61749$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61750
61751    # Reset to default value
61752    FREETYPE_BASE_NAME=freetype
61753    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61754    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61755      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61756          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61757        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61758        # for the .6 version explicitly.
61759        FREETYPE_BASE_NAME=freetype.6
61760        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61761        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61762$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61763      else
61764        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61765$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61766        FOUND_FREETYPE=no
61767      fi
61768    else
61769      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61770        # On Windows, we will need both .lib and .dll file.
61771        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61772          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61773$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61774          FOUND_FREETYPE=no
61775        fi
61776      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61777          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61778        # Found lib in isa dir, use that instead.
61779        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61780        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61781$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61782      fi
61783    fi
61784  fi
61785
61786  if test "x$FOUND_FREETYPE" = xyes; then
61787
61788  # Only process if variable expands to non-empty
61789
61790  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61792
61793  # Input might be given as Windows format, start by converting to
61794  # unix format.
61795  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61796  new_path=`$CYGPATH -u "$path"`
61797
61798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61801  # "foo.exe" is OK but "foo" is an error.
61802  #
61803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61804  # It is also a way to make sure we got the proper file name for the real test later on.
61805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61806  if test "x$test_shortpath" = x; then
61807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61809    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61810  fi
61811
61812  # Call helper function which possibly converts this using DOS-style short mode.
61813  # If so, the updated path is stored in $new_path.
61814
61815  input_path="$new_path"
61816  # Check if we need to convert this using DOS-style short mode. If the path
61817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61818  # take no chances and rewrite it.
61819  # Note: m4 eats our [], so we need to use [ and ] instead.
61820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61821  if test "x$has_forbidden_chars" != x; then
61822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61826      # Going to short mode and back again did indeed matter. Since short mode is
61827      # case insensitive, let's make it lowercase to improve readability.
61828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61829      # Now convert it back to Unix-style (cygpath)
61830      input_path=`$CYGPATH -u "$shortmode_path"`
61831      new_path="$input_path"
61832    fi
61833  fi
61834
61835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61836  if test "x$test_cygdrive_prefix" = x; then
61837    # As a simple fix, exclude /usr/bin since it's not a real path.
61838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61840      # a path prefixed by /cygdrive for fixpath to work.
61841      new_path="$CYGWIN_ROOT_PATH$input_path"
61842    fi
61843  fi
61844
61845
61846  if test "x$path" != "x$new_path"; then
61847    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61850  fi
61851
61852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61853
61854  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61855  has_colon=`$ECHO $path | $GREP ^.:`
61856  new_path="$path"
61857  if test "x$has_colon" = x; then
61858    # Not in mixed or Windows style, start by that.
61859    new_path=`cmd //c echo $path`
61860  fi
61861
61862
61863  input_path="$new_path"
61864  # Check if we need to convert this using DOS-style short mode. If the path
61865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61866  # take no chances and rewrite it.
61867  # Note: m4 eats our [], so we need to use [ and ] instead.
61868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61869  if test "x$has_forbidden_chars" != x; then
61870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61872  fi
61873
61874
61875  windows_path="$new_path"
61876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61877    unix_path=`$CYGPATH -u "$windows_path"`
61878    new_path="$unix_path"
61879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61881    new_path="$unix_path"
61882  fi
61883
61884  if test "x$path" != "x$new_path"; then
61885    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61887$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61888  fi
61889
61890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61892
61893    else
61894      # We're on a unix platform. Hooray! :)
61895      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61896      has_space=`$ECHO "$path" | $GREP " "`
61897      if test "x$has_space" != x; then
61898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61901      fi
61902
61903      # Use eval to expand a potential ~
61904      eval path="$path"
61905      if test ! -f "$path" && test ! -d "$path"; then
61906        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61907      fi
61908
61909      if test -d "$path"; then
61910        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61911      else
61912        dir="`$DIRNAME "$path"`"
61913        base="`$BASENAME "$path"`"
61914        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61915      fi
61916    fi
61917  fi
61918
61919
61920  # Only process if variable expands to non-empty
61921
61922  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61924
61925  # Input might be given as Windows format, start by converting to
61926  # unix format.
61927  path="$POTENTIAL_FREETYPE_LIB_PATH"
61928  new_path=`$CYGPATH -u "$path"`
61929
61930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61933  # "foo.exe" is OK but "foo" is an error.
61934  #
61935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61936  # It is also a way to make sure we got the proper file name for the real test later on.
61937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61938  if test "x$test_shortpath" = x; then
61939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61941    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61942  fi
61943
61944  # Call helper function which possibly converts this using DOS-style short mode.
61945  # If so, the updated path is stored in $new_path.
61946
61947  input_path="$new_path"
61948  # Check if we need to convert this using DOS-style short mode. If the path
61949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61950  # take no chances and rewrite it.
61951  # Note: m4 eats our [], so we need to use [ and ] instead.
61952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61953  if test "x$has_forbidden_chars" != x; then
61954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61958      # Going to short mode and back again did indeed matter. Since short mode is
61959      # case insensitive, let's make it lowercase to improve readability.
61960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61961      # Now convert it back to Unix-style (cygpath)
61962      input_path=`$CYGPATH -u "$shortmode_path"`
61963      new_path="$input_path"
61964    fi
61965  fi
61966
61967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61968  if test "x$test_cygdrive_prefix" = x; then
61969    # As a simple fix, exclude /usr/bin since it's not a real path.
61970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61972      # a path prefixed by /cygdrive for fixpath to work.
61973      new_path="$CYGWIN_ROOT_PATH$input_path"
61974    fi
61975  fi
61976
61977
61978  if test "x$path" != "x$new_path"; then
61979    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61982  fi
61983
61984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61985
61986  path="$POTENTIAL_FREETYPE_LIB_PATH"
61987  has_colon=`$ECHO $path | $GREP ^.:`
61988  new_path="$path"
61989  if test "x$has_colon" = x; then
61990    # Not in mixed or Windows style, start by that.
61991    new_path=`cmd //c echo $path`
61992  fi
61993
61994
61995  input_path="$new_path"
61996  # Check if we need to convert this using DOS-style short mode. If the path
61997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61998  # take no chances and rewrite it.
61999  # Note: m4 eats our [], so we need to use [ and ] instead.
62000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62001  if test "x$has_forbidden_chars" != x; then
62002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62004  fi
62005
62006
62007  windows_path="$new_path"
62008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62009    unix_path=`$CYGPATH -u "$windows_path"`
62010    new_path="$unix_path"
62011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62013    new_path="$unix_path"
62014  fi
62015
62016  if test "x$path" != "x$new_path"; then
62017    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62020  fi
62021
62022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62024
62025    else
62026      # We're on a unix platform. Hooray! :)
62027      path="$POTENTIAL_FREETYPE_LIB_PATH"
62028      has_space=`$ECHO "$path" | $GREP " "`
62029      if test "x$has_space" != x; then
62030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62033      fi
62034
62035      # Use eval to expand a potential ~
62036      eval path="$path"
62037      if test ! -f "$path" && test ! -d "$path"; then
62038        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62039      fi
62040
62041      if test -d "$path"; then
62042        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62043      else
62044        dir="`$DIRNAME "$path"`"
62045        base="`$BASENAME "$path"`"
62046        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62047      fi
62048    fi
62049  fi
62050
62051
62052    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62054$as_echo_n "checking for freetype includes... " >&6; }
62055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62056$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62057    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62059$as_echo_n "checking for freetype libraries... " >&6; }
62060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62061$as_echo "$FREETYPE_LIB_PATH" >&6; }
62062  fi
62063
62064            fi
62065          fi
62066
62067          if test "x$FOUND_FREETYPE" != xyes; then
62068            FREETYPE_BASE_DIR="$SYSROOT/usr"
62069            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62070
62071  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62072  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62073  METHOD="well-known location"
62074
62075  # Let's start with an optimistic view of the world :-)
62076  FOUND_FREETYPE=yes
62077
62078  # First look for the canonical freetype main include file ft2build.h.
62079  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62080    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62081    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62082    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62083      # Fail.
62084      FOUND_FREETYPE=no
62085    fi
62086  fi
62087
62088  if test "x$FOUND_FREETYPE" = xyes; then
62089    # Include file found, let's continue the sanity check.
62090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62091$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62092
62093    # Reset to default value
62094    FREETYPE_BASE_NAME=freetype
62095    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62096    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62097      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62098          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62099        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62100        # for the .6 version explicitly.
62101        FREETYPE_BASE_NAME=freetype.6
62102        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62103        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62104$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62105      else
62106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62107$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62108        FOUND_FREETYPE=no
62109      fi
62110    else
62111      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62112        # On Windows, we will need both .lib and .dll file.
62113        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62114          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62115$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62116          FOUND_FREETYPE=no
62117        fi
62118      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62120        # Found lib in isa dir, use that instead.
62121        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62122        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62123$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62124      fi
62125    fi
62126  fi
62127
62128  if test "x$FOUND_FREETYPE" = xyes; then
62129
62130  # Only process if variable expands to non-empty
62131
62132  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62134
62135  # Input might be given as Windows format, start by converting to
62136  # unix format.
62137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62138  new_path=`$CYGPATH -u "$path"`
62139
62140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62143  # "foo.exe" is OK but "foo" is an error.
62144  #
62145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62146  # It is also a way to make sure we got the proper file name for the real test later on.
62147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62148  if test "x$test_shortpath" = x; then
62149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62151    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62152  fi
62153
62154  # Call helper function which possibly converts this using DOS-style short mode.
62155  # If so, the updated path is stored in $new_path.
62156
62157  input_path="$new_path"
62158  # Check if we need to convert this using DOS-style short mode. If the path
62159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62160  # take no chances and rewrite it.
62161  # Note: m4 eats our [], so we need to use [ and ] instead.
62162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62163  if test "x$has_forbidden_chars" != x; then
62164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62168      # Going to short mode and back again did indeed matter. Since short mode is
62169      # case insensitive, let's make it lowercase to improve readability.
62170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62171      # Now convert it back to Unix-style (cygpath)
62172      input_path=`$CYGPATH -u "$shortmode_path"`
62173      new_path="$input_path"
62174    fi
62175  fi
62176
62177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62178  if test "x$test_cygdrive_prefix" = x; then
62179    # As a simple fix, exclude /usr/bin since it's not a real path.
62180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62182      # a path prefixed by /cygdrive for fixpath to work.
62183      new_path="$CYGWIN_ROOT_PATH$input_path"
62184    fi
62185  fi
62186
62187
62188  if test "x$path" != "x$new_path"; then
62189    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62191$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62192  fi
62193
62194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62195
62196  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62197  has_colon=`$ECHO $path | $GREP ^.:`
62198  new_path="$path"
62199  if test "x$has_colon" = x; then
62200    # Not in mixed or Windows style, start by that.
62201    new_path=`cmd //c echo $path`
62202  fi
62203
62204
62205  input_path="$new_path"
62206  # Check if we need to convert this using DOS-style short mode. If the path
62207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62208  # take no chances and rewrite it.
62209  # Note: m4 eats our [], so we need to use [ and ] instead.
62210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62211  if test "x$has_forbidden_chars" != x; then
62212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62214  fi
62215
62216
62217  windows_path="$new_path"
62218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62219    unix_path=`$CYGPATH -u "$windows_path"`
62220    new_path="$unix_path"
62221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62223    new_path="$unix_path"
62224  fi
62225
62226  if test "x$path" != "x$new_path"; then
62227    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62229$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62230  fi
62231
62232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62234
62235    else
62236      # We're on a unix platform. Hooray! :)
62237      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62238      has_space=`$ECHO "$path" | $GREP " "`
62239      if test "x$has_space" != x; then
62240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62243      fi
62244
62245      # Use eval to expand a potential ~
62246      eval path="$path"
62247      if test ! -f "$path" && test ! -d "$path"; then
62248        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62249      fi
62250
62251      if test -d "$path"; then
62252        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62253      else
62254        dir="`$DIRNAME "$path"`"
62255        base="`$BASENAME "$path"`"
62256        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62257      fi
62258    fi
62259  fi
62260
62261
62262  # Only process if variable expands to non-empty
62263
62264  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62266
62267  # Input might be given as Windows format, start by converting to
62268  # unix format.
62269  path="$POTENTIAL_FREETYPE_LIB_PATH"
62270  new_path=`$CYGPATH -u "$path"`
62271
62272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62275  # "foo.exe" is OK but "foo" is an error.
62276  #
62277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62278  # It is also a way to make sure we got the proper file name for the real test later on.
62279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62280  if test "x$test_shortpath" = x; then
62281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62283    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62284  fi
62285
62286  # Call helper function which possibly converts this using DOS-style short mode.
62287  # If so, the updated path is stored in $new_path.
62288
62289  input_path="$new_path"
62290  # Check if we need to convert this using DOS-style short mode. If the path
62291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62292  # take no chances and rewrite it.
62293  # Note: m4 eats our [], so we need to use [ and ] instead.
62294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62295  if test "x$has_forbidden_chars" != x; then
62296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62300      # Going to short mode and back again did indeed matter. Since short mode is
62301      # case insensitive, let's make it lowercase to improve readability.
62302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62303      # Now convert it back to Unix-style (cygpath)
62304      input_path=`$CYGPATH -u "$shortmode_path"`
62305      new_path="$input_path"
62306    fi
62307  fi
62308
62309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62310  if test "x$test_cygdrive_prefix" = x; then
62311    # As a simple fix, exclude /usr/bin since it's not a real path.
62312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62314      # a path prefixed by /cygdrive for fixpath to work.
62315      new_path="$CYGWIN_ROOT_PATH$input_path"
62316    fi
62317  fi
62318
62319
62320  if test "x$path" != "x$new_path"; then
62321    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62324  fi
62325
62326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62327
62328  path="$POTENTIAL_FREETYPE_LIB_PATH"
62329  has_colon=`$ECHO $path | $GREP ^.:`
62330  new_path="$path"
62331  if test "x$has_colon" = x; then
62332    # Not in mixed or Windows style, start by that.
62333    new_path=`cmd //c echo $path`
62334  fi
62335
62336
62337  input_path="$new_path"
62338  # Check if we need to convert this using DOS-style short mode. If the path
62339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62340  # take no chances and rewrite it.
62341  # Note: m4 eats our [], so we need to use [ and ] instead.
62342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62343  if test "x$has_forbidden_chars" != x; then
62344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62346  fi
62347
62348
62349  windows_path="$new_path"
62350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62351    unix_path=`$CYGPATH -u "$windows_path"`
62352    new_path="$unix_path"
62353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62355    new_path="$unix_path"
62356  fi
62357
62358  if test "x$path" != "x$new_path"; then
62359    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62362  fi
62363
62364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62366
62367    else
62368      # We're on a unix platform. Hooray! :)
62369      path="$POTENTIAL_FREETYPE_LIB_PATH"
62370      has_space=`$ECHO "$path" | $GREP " "`
62371      if test "x$has_space" != x; then
62372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62375      fi
62376
62377      # Use eval to expand a potential ~
62378      eval path="$path"
62379      if test ! -f "$path" && test ! -d "$path"; then
62380        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62381      fi
62382
62383      if test -d "$path"; then
62384        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62385      else
62386        dir="`$DIRNAME "$path"`"
62387        base="`$BASENAME "$path"`"
62388        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62389      fi
62390    fi
62391  fi
62392
62393
62394    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62396$as_echo_n "checking for freetype includes... " >&6; }
62397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62398$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62399    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62401$as_echo_n "checking for freetype libraries... " >&6; }
62402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62403$as_echo "$FREETYPE_LIB_PATH" >&6; }
62404  fi
62405
62406            else
62407
62408  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62409  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62410  METHOD="well-known location"
62411
62412  # Let's start with an optimistic view of the world :-)
62413  FOUND_FREETYPE=yes
62414
62415  # First look for the canonical freetype main include file ft2build.h.
62416  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62417    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62418    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62419    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62420      # Fail.
62421      FOUND_FREETYPE=no
62422    fi
62423  fi
62424
62425  if test "x$FOUND_FREETYPE" = xyes; then
62426    # Include file found, let's continue the sanity check.
62427    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62428$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62429
62430    # Reset to default value
62431    FREETYPE_BASE_NAME=freetype
62432    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62433    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62434      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62435          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62436        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62437        # for the .6 version explicitly.
62438        FREETYPE_BASE_NAME=freetype.6
62439        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62440        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62441$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62442      else
62443        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62444$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62445        FOUND_FREETYPE=no
62446      fi
62447    else
62448      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62449        # On Windows, we will need both .lib and .dll file.
62450        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62451          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62452$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62453          FOUND_FREETYPE=no
62454        fi
62455      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62456          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62457        # Found lib in isa dir, use that instead.
62458        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62459        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62460$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62461      fi
62462    fi
62463  fi
62464
62465  if test "x$FOUND_FREETYPE" = xyes; then
62466
62467  # Only process if variable expands to non-empty
62468
62469  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62471
62472  # Input might be given as Windows format, start by converting to
62473  # unix format.
62474  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62475  new_path=`$CYGPATH -u "$path"`
62476
62477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62480  # "foo.exe" is OK but "foo" is an error.
62481  #
62482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62483  # It is also a way to make sure we got the proper file name for the real test later on.
62484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62485  if test "x$test_shortpath" = x; then
62486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62488    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62489  fi
62490
62491  # Call helper function which possibly converts this using DOS-style short mode.
62492  # If so, the updated path is stored in $new_path.
62493
62494  input_path="$new_path"
62495  # Check if we need to convert this using DOS-style short mode. If the path
62496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62497  # take no chances and rewrite it.
62498  # Note: m4 eats our [], so we need to use [ and ] instead.
62499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62500  if test "x$has_forbidden_chars" != x; then
62501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62505      # Going to short mode and back again did indeed matter. Since short mode is
62506      # case insensitive, let's make it lowercase to improve readability.
62507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62508      # Now convert it back to Unix-style (cygpath)
62509      input_path=`$CYGPATH -u "$shortmode_path"`
62510      new_path="$input_path"
62511    fi
62512  fi
62513
62514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62515  if test "x$test_cygdrive_prefix" = x; then
62516    # As a simple fix, exclude /usr/bin since it's not a real path.
62517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62519      # a path prefixed by /cygdrive for fixpath to work.
62520      new_path="$CYGWIN_ROOT_PATH$input_path"
62521    fi
62522  fi
62523
62524
62525  if test "x$path" != "x$new_path"; then
62526    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62528$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62529  fi
62530
62531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62532
62533  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62534  has_colon=`$ECHO $path | $GREP ^.:`
62535  new_path="$path"
62536  if test "x$has_colon" = x; then
62537    # Not in mixed or Windows style, start by that.
62538    new_path=`cmd //c echo $path`
62539  fi
62540
62541
62542  input_path="$new_path"
62543  # Check if we need to convert this using DOS-style short mode. If the path
62544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62545  # take no chances and rewrite it.
62546  # Note: m4 eats our [], so we need to use [ and ] instead.
62547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62548  if test "x$has_forbidden_chars" != x; then
62549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62551  fi
62552
62553
62554  windows_path="$new_path"
62555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62556    unix_path=`$CYGPATH -u "$windows_path"`
62557    new_path="$unix_path"
62558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62560    new_path="$unix_path"
62561  fi
62562
62563  if test "x$path" != "x$new_path"; then
62564    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62567  fi
62568
62569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62571
62572    else
62573      # We're on a unix platform. Hooray! :)
62574      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62575      has_space=`$ECHO "$path" | $GREP " "`
62576      if test "x$has_space" != x; then
62577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62578$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62580      fi
62581
62582      # Use eval to expand a potential ~
62583      eval path="$path"
62584      if test ! -f "$path" && test ! -d "$path"; then
62585        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62586      fi
62587
62588      if test -d "$path"; then
62589        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62590      else
62591        dir="`$DIRNAME "$path"`"
62592        base="`$BASENAME "$path"`"
62593        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62594      fi
62595    fi
62596  fi
62597
62598
62599  # Only process if variable expands to non-empty
62600
62601  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62603
62604  # Input might be given as Windows format, start by converting to
62605  # unix format.
62606  path="$POTENTIAL_FREETYPE_LIB_PATH"
62607  new_path=`$CYGPATH -u "$path"`
62608
62609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62612  # "foo.exe" is OK but "foo" is an error.
62613  #
62614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62615  # It is also a way to make sure we got the proper file name for the real test later on.
62616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62617  if test "x$test_shortpath" = x; then
62618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62620    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62621  fi
62622
62623  # Call helper function which possibly converts this using DOS-style short mode.
62624  # If so, the updated path is stored in $new_path.
62625
62626  input_path="$new_path"
62627  # Check if we need to convert this using DOS-style short mode. If the path
62628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62629  # take no chances and rewrite it.
62630  # Note: m4 eats our [], so we need to use [ and ] instead.
62631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62632  if test "x$has_forbidden_chars" != x; then
62633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62637      # Going to short mode and back again did indeed matter. Since short mode is
62638      # case insensitive, let's make it lowercase to improve readability.
62639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62640      # Now convert it back to Unix-style (cygpath)
62641      input_path=`$CYGPATH -u "$shortmode_path"`
62642      new_path="$input_path"
62643    fi
62644  fi
62645
62646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62647  if test "x$test_cygdrive_prefix" = x; then
62648    # As a simple fix, exclude /usr/bin since it's not a real path.
62649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62651      # a path prefixed by /cygdrive for fixpath to work.
62652      new_path="$CYGWIN_ROOT_PATH$input_path"
62653    fi
62654  fi
62655
62656
62657  if test "x$path" != "x$new_path"; then
62658    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62661  fi
62662
62663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62664
62665  path="$POTENTIAL_FREETYPE_LIB_PATH"
62666  has_colon=`$ECHO $path | $GREP ^.:`
62667  new_path="$path"
62668  if test "x$has_colon" = x; then
62669    # Not in mixed or Windows style, start by that.
62670    new_path=`cmd //c echo $path`
62671  fi
62672
62673
62674  input_path="$new_path"
62675  # Check if we need to convert this using DOS-style short mode. If the path
62676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62677  # take no chances and rewrite it.
62678  # Note: m4 eats our [], so we need to use [ and ] instead.
62679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62680  if test "x$has_forbidden_chars" != x; then
62681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62683  fi
62684
62685
62686  windows_path="$new_path"
62687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62688    unix_path=`$CYGPATH -u "$windows_path"`
62689    new_path="$unix_path"
62690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62692    new_path="$unix_path"
62693  fi
62694
62695  if test "x$path" != "x$new_path"; then
62696    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62699  fi
62700
62701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62703
62704    else
62705      # We're on a unix platform. Hooray! :)
62706      path="$POTENTIAL_FREETYPE_LIB_PATH"
62707      has_space=`$ECHO "$path" | $GREP " "`
62708      if test "x$has_space" != x; then
62709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62710$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62712      fi
62713
62714      # Use eval to expand a potential ~
62715      eval path="$path"
62716      if test ! -f "$path" && test ! -d "$path"; then
62717        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62718      fi
62719
62720      if test -d "$path"; then
62721        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62722      else
62723        dir="`$DIRNAME "$path"`"
62724        base="`$BASENAME "$path"`"
62725        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62726      fi
62727    fi
62728  fi
62729
62730
62731    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62733$as_echo_n "checking for freetype includes... " >&6; }
62734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62735$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62736    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62738$as_echo_n "checking for freetype libraries... " >&6; }
62739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62740$as_echo "$FREETYPE_LIB_PATH" >&6; }
62741  fi
62742
62743              if test "x$FOUND_FREETYPE" != xyes; then
62744
62745  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62746  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62747  METHOD="well-known location"
62748
62749  # Let's start with an optimistic view of the world :-)
62750  FOUND_FREETYPE=yes
62751
62752  # First look for the canonical freetype main include file ft2build.h.
62753  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62754    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62755    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62756    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62757      # Fail.
62758      FOUND_FREETYPE=no
62759    fi
62760  fi
62761
62762  if test "x$FOUND_FREETYPE" = xyes; then
62763    # Include file found, let's continue the sanity check.
62764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62765$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62766
62767    # Reset to default value
62768    FREETYPE_BASE_NAME=freetype
62769    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62770    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62771      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62772          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62773        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62774        # for the .6 version explicitly.
62775        FREETYPE_BASE_NAME=freetype.6
62776        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62777        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62778$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62779      else
62780        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62781$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62782        FOUND_FREETYPE=no
62783      fi
62784    else
62785      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62786        # On Windows, we will need both .lib and .dll file.
62787        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62788          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62789$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62790          FOUND_FREETYPE=no
62791        fi
62792      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62794        # Found lib in isa dir, use that instead.
62795        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62796        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62797$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62798      fi
62799    fi
62800  fi
62801
62802  if test "x$FOUND_FREETYPE" = xyes; then
62803
62804  # Only process if variable expands to non-empty
62805
62806  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62808
62809  # Input might be given as Windows format, start by converting to
62810  # unix format.
62811  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62812  new_path=`$CYGPATH -u "$path"`
62813
62814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62817  # "foo.exe" is OK but "foo" is an error.
62818  #
62819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62820  # It is also a way to make sure we got the proper file name for the real test later on.
62821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62822  if test "x$test_shortpath" = x; then
62823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62825    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62826  fi
62827
62828  # Call helper function which possibly converts this using DOS-style short mode.
62829  # If so, the updated path is stored in $new_path.
62830
62831  input_path="$new_path"
62832  # Check if we need to convert this using DOS-style short mode. If the path
62833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62834  # take no chances and rewrite it.
62835  # Note: m4 eats our [], so we need to use [ and ] instead.
62836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62837  if test "x$has_forbidden_chars" != x; then
62838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62842      # Going to short mode and back again did indeed matter. Since short mode is
62843      # case insensitive, let's make it lowercase to improve readability.
62844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62845      # Now convert it back to Unix-style (cygpath)
62846      input_path=`$CYGPATH -u "$shortmode_path"`
62847      new_path="$input_path"
62848    fi
62849  fi
62850
62851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62852  if test "x$test_cygdrive_prefix" = x; then
62853    # As a simple fix, exclude /usr/bin since it's not a real path.
62854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62856      # a path prefixed by /cygdrive for fixpath to work.
62857      new_path="$CYGWIN_ROOT_PATH$input_path"
62858    fi
62859  fi
62860
62861
62862  if test "x$path" != "x$new_path"; then
62863    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62865$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62866  fi
62867
62868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62869
62870  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62871  has_colon=`$ECHO $path | $GREP ^.:`
62872  new_path="$path"
62873  if test "x$has_colon" = x; then
62874    # Not in mixed or Windows style, start by that.
62875    new_path=`cmd //c echo $path`
62876  fi
62877
62878
62879  input_path="$new_path"
62880  # Check if we need to convert this using DOS-style short mode. If the path
62881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62882  # take no chances and rewrite it.
62883  # Note: m4 eats our [], so we need to use [ and ] instead.
62884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62885  if test "x$has_forbidden_chars" != x; then
62886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62888  fi
62889
62890
62891  windows_path="$new_path"
62892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62893    unix_path=`$CYGPATH -u "$windows_path"`
62894    new_path="$unix_path"
62895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62897    new_path="$unix_path"
62898  fi
62899
62900  if test "x$path" != "x$new_path"; then
62901    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62904  fi
62905
62906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62908
62909    else
62910      # We're on a unix platform. Hooray! :)
62911      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62912      has_space=`$ECHO "$path" | $GREP " "`
62913      if test "x$has_space" != x; then
62914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62915$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62917      fi
62918
62919      # Use eval to expand a potential ~
62920      eval path="$path"
62921      if test ! -f "$path" && test ! -d "$path"; then
62922        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62923      fi
62924
62925      if test -d "$path"; then
62926        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62927      else
62928        dir="`$DIRNAME "$path"`"
62929        base="`$BASENAME "$path"`"
62930        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62931      fi
62932    fi
62933  fi
62934
62935
62936  # Only process if variable expands to non-empty
62937
62938  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62940
62941  # Input might be given as Windows format, start by converting to
62942  # unix format.
62943  path="$POTENTIAL_FREETYPE_LIB_PATH"
62944  new_path=`$CYGPATH -u "$path"`
62945
62946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62949  # "foo.exe" is OK but "foo" is an error.
62950  #
62951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62952  # It is also a way to make sure we got the proper file name for the real test later on.
62953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62954  if test "x$test_shortpath" = x; then
62955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62957    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62958  fi
62959
62960  # Call helper function which possibly converts this using DOS-style short mode.
62961  # If so, the updated path is stored in $new_path.
62962
62963  input_path="$new_path"
62964  # Check if we need to convert this using DOS-style short mode. If the path
62965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62966  # take no chances and rewrite it.
62967  # Note: m4 eats our [], so we need to use [ and ] instead.
62968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62969  if test "x$has_forbidden_chars" != x; then
62970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62974      # Going to short mode and back again did indeed matter. Since short mode is
62975      # case insensitive, let's make it lowercase to improve readability.
62976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62977      # Now convert it back to Unix-style (cygpath)
62978      input_path=`$CYGPATH -u "$shortmode_path"`
62979      new_path="$input_path"
62980    fi
62981  fi
62982
62983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62984  if test "x$test_cygdrive_prefix" = x; then
62985    # As a simple fix, exclude /usr/bin since it's not a real path.
62986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62988      # a path prefixed by /cygdrive for fixpath to work.
62989      new_path="$CYGWIN_ROOT_PATH$input_path"
62990    fi
62991  fi
62992
62993
62994  if test "x$path" != "x$new_path"; then
62995    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62997$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62998  fi
62999
63000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63001
63002  path="$POTENTIAL_FREETYPE_LIB_PATH"
63003  has_colon=`$ECHO $path | $GREP ^.:`
63004  new_path="$path"
63005  if test "x$has_colon" = x; then
63006    # Not in mixed or Windows style, start by that.
63007    new_path=`cmd //c echo $path`
63008  fi
63009
63010
63011  input_path="$new_path"
63012  # Check if we need to convert this using DOS-style short mode. If the path
63013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63014  # take no chances and rewrite it.
63015  # Note: m4 eats our [], so we need to use [ and ] instead.
63016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63017  if test "x$has_forbidden_chars" != x; then
63018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63020  fi
63021
63022
63023  windows_path="$new_path"
63024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63025    unix_path=`$CYGPATH -u "$windows_path"`
63026    new_path="$unix_path"
63027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63029    new_path="$unix_path"
63030  fi
63031
63032  if test "x$path" != "x$new_path"; then
63033    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63035$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63036  fi
63037
63038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63040
63041    else
63042      # We're on a unix platform. Hooray! :)
63043      path="$POTENTIAL_FREETYPE_LIB_PATH"
63044      has_space=`$ECHO "$path" | $GREP " "`
63045      if test "x$has_space" != x; then
63046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63049      fi
63050
63051      # Use eval to expand a potential ~
63052      eval path="$path"
63053      if test ! -f "$path" && test ! -d "$path"; then
63054        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63055      fi
63056
63057      if test -d "$path"; then
63058        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63059      else
63060        dir="`$DIRNAME "$path"`"
63061        base="`$BASENAME "$path"`"
63062        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63063      fi
63064    fi
63065  fi
63066
63067
63068    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63070$as_echo_n "checking for freetype includes... " >&6; }
63071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63072$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63073    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63075$as_echo_n "checking for freetype libraries... " >&6; }
63076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63077$as_echo "$FREETYPE_LIB_PATH" >&6; }
63078  fi
63079
63080              fi
63081            fi
63082          fi
63083        fi
63084      fi # end check in well-known locations
63085
63086      if test "x$FOUND_FREETYPE" != xyes; then
63087
63088  # Print a helpful message on how to acquire the necessary build dependency.
63089  # freetype is the help tag: freetype, cups, alsa etc
63090  MISSING_DEPENDENCY=freetype
63091
63092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63093    cygwin_help $MISSING_DEPENDENCY
63094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63095    msys_help $MISSING_DEPENDENCY
63096  else
63097    PKGHANDLER_COMMAND=
63098
63099    case $PKGHANDLER in
63100      apt-get)
63101        apt_help     $MISSING_DEPENDENCY ;;
63102      yum)
63103        yum_help     $MISSING_DEPENDENCY ;;
63104      brew)
63105        brew_help    $MISSING_DEPENDENCY ;;
63106      port)
63107        port_help    $MISSING_DEPENDENCY ;;
63108      pkgutil)
63109        pkgutil_help $MISSING_DEPENDENCY ;;
63110      pkgadd)
63111        pkgadd_help  $MISSING_DEPENDENCY ;;
63112    esac
63113
63114    if test "x$PKGHANDLER_COMMAND" != x; then
63115      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63116    fi
63117  fi
63118
63119        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63120      fi
63121    fi # end user specified settings
63122
63123    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63124    if test "x$FREETYPE_CFLAGS" = x; then
63125
63126  # Only process if variable expands to non-empty
63127
63128  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63130
63131  # Input might be given as Windows format, start by converting to
63132  # unix format.
63133  path="$FREETYPE_INCLUDE_PATH"
63134  new_path=`$CYGPATH -u "$path"`
63135
63136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63139  # "foo.exe" is OK but "foo" is an error.
63140  #
63141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63142  # It is also a way to make sure we got the proper file name for the real test later on.
63143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63144  if test "x$test_shortpath" = x; then
63145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63146$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63147    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63148  fi
63149
63150  # Call helper function which possibly converts this using DOS-style short mode.
63151  # If so, the updated path is stored in $new_path.
63152
63153  input_path="$new_path"
63154  # Check if we need to convert this using DOS-style short mode. If the path
63155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63156  # take no chances and rewrite it.
63157  # Note: m4 eats our [], so we need to use [ and ] instead.
63158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63159  if test "x$has_forbidden_chars" != x; then
63160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63164      # Going to short mode and back again did indeed matter. Since short mode is
63165      # case insensitive, let's make it lowercase to improve readability.
63166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63167      # Now convert it back to Unix-style (cygpath)
63168      input_path=`$CYGPATH -u "$shortmode_path"`
63169      new_path="$input_path"
63170    fi
63171  fi
63172
63173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63174  if test "x$test_cygdrive_prefix" = x; then
63175    # As a simple fix, exclude /usr/bin since it's not a real path.
63176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63178      # a path prefixed by /cygdrive for fixpath to work.
63179      new_path="$CYGWIN_ROOT_PATH$input_path"
63180    fi
63181  fi
63182
63183
63184  if test "x$path" != "x$new_path"; then
63185    FREETYPE_INCLUDE_PATH="$new_path"
63186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63187$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63188  fi
63189
63190    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63191
63192  path="$FREETYPE_INCLUDE_PATH"
63193  has_colon=`$ECHO $path | $GREP ^.:`
63194  new_path="$path"
63195  if test "x$has_colon" = x; then
63196    # Not in mixed or Windows style, start by that.
63197    new_path=`cmd //c echo $path`
63198  fi
63199
63200
63201  input_path="$new_path"
63202  # Check if we need to convert this using DOS-style short mode. If the path
63203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63204  # take no chances and rewrite it.
63205  # Note: m4 eats our [], so we need to use [ and ] instead.
63206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63207  if test "x$has_forbidden_chars" != x; then
63208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63210  fi
63211
63212
63213  windows_path="$new_path"
63214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63215    unix_path=`$CYGPATH -u "$windows_path"`
63216    new_path="$unix_path"
63217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63219    new_path="$unix_path"
63220  fi
63221
63222  if test "x$path" != "x$new_path"; then
63223    FREETYPE_INCLUDE_PATH="$new_path"
63224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63225$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63226  fi
63227
63228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63230
63231    else
63232      # We're on a unix platform. Hooray! :)
63233      path="$FREETYPE_INCLUDE_PATH"
63234      has_space=`$ECHO "$path" | $GREP " "`
63235      if test "x$has_space" != x; then
63236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63237$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63238        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63239      fi
63240
63241      # Use eval to expand a potential ~
63242      eval path="$path"
63243      if test ! -f "$path" && test ! -d "$path"; then
63244        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63245      fi
63246
63247      if test -d "$path"; then
63248        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63249      else
63250        dir="`$DIRNAME "$path"`"
63251        base="`$BASENAME "$path"`"
63252        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63253      fi
63254    fi
63255  fi
63256
63257      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63258        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63259      else
63260        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63261      fi
63262    fi
63263
63264    if test "x$FREETYPE_LIBS" = x; then
63265
63266  # Only process if variable expands to non-empty
63267
63268  if test "x$FREETYPE_LIB_PATH" != x; then
63269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63270
63271  # Input might be given as Windows format, start by converting to
63272  # unix format.
63273  path="$FREETYPE_LIB_PATH"
63274  new_path=`$CYGPATH -u "$path"`
63275
63276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63279  # "foo.exe" is OK but "foo" is an error.
63280  #
63281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63282  # It is also a way to make sure we got the proper file name for the real test later on.
63283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63284  if test "x$test_shortpath" = x; then
63285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63286$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63287    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63288  fi
63289
63290  # Call helper function which possibly converts this using DOS-style short mode.
63291  # If so, the updated path is stored in $new_path.
63292
63293  input_path="$new_path"
63294  # Check if we need to convert this using DOS-style short mode. If the path
63295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63296  # take no chances and rewrite it.
63297  # Note: m4 eats our [], so we need to use [ and ] instead.
63298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63299  if test "x$has_forbidden_chars" != x; then
63300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63304      # Going to short mode and back again did indeed matter. Since short mode is
63305      # case insensitive, let's make it lowercase to improve readability.
63306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63307      # Now convert it back to Unix-style (cygpath)
63308      input_path=`$CYGPATH -u "$shortmode_path"`
63309      new_path="$input_path"
63310    fi
63311  fi
63312
63313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63314  if test "x$test_cygdrive_prefix" = x; then
63315    # As a simple fix, exclude /usr/bin since it's not a real path.
63316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63318      # a path prefixed by /cygdrive for fixpath to work.
63319      new_path="$CYGWIN_ROOT_PATH$input_path"
63320    fi
63321  fi
63322
63323
63324  if test "x$path" != "x$new_path"; then
63325    FREETYPE_LIB_PATH="$new_path"
63326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63327$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63328  fi
63329
63330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63331
63332  path="$FREETYPE_LIB_PATH"
63333  has_colon=`$ECHO $path | $GREP ^.:`
63334  new_path="$path"
63335  if test "x$has_colon" = x; then
63336    # Not in mixed or Windows style, start by that.
63337    new_path=`cmd //c echo $path`
63338  fi
63339
63340
63341  input_path="$new_path"
63342  # Check if we need to convert this using DOS-style short mode. If the path
63343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63344  # take no chances and rewrite it.
63345  # Note: m4 eats our [], so we need to use [ and ] instead.
63346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63347  if test "x$has_forbidden_chars" != x; then
63348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63350  fi
63351
63352
63353  windows_path="$new_path"
63354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63355    unix_path=`$CYGPATH -u "$windows_path"`
63356    new_path="$unix_path"
63357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63359    new_path="$unix_path"
63360  fi
63361
63362  if test "x$path" != "x$new_path"; then
63363    FREETYPE_LIB_PATH="$new_path"
63364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63365$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63366  fi
63367
63368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63370
63371    else
63372      # We're on a unix platform. Hooray! :)
63373      path="$FREETYPE_LIB_PATH"
63374      has_space=`$ECHO "$path" | $GREP " "`
63375      if test "x$has_space" != x; then
63376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63377$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63379      fi
63380
63381      # Use eval to expand a potential ~
63382      eval path="$path"
63383      if test ! -f "$path" && test ! -d "$path"; then
63384        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63385      fi
63386
63387      if test -d "$path"; then
63388        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63389      else
63390        dir="`$DIRNAME "$path"`"
63391        base="`$BASENAME "$path"`"
63392        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63393      fi
63394    fi
63395  fi
63396
63397      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63398        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63399      else
63400        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63401      fi
63402    fi
63403
63404    # Try to compile it
63405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63406$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63407    ac_ext=cpp
63408ac_cpp='$CXXCPP $CPPFLAGS'
63409ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63410ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63411ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63412
63413    PREV_CXXCFLAGS="$CXXFLAGS"
63414    PREV_LIBS="$LIBS"
63415    PREV_CXX="$CXX"
63416    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63417    LIBS="$LIBS $FREETYPE_LIBS"
63418    CXX="$FIXPATH $CXX"
63419    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63420/* end confdefs.h.  */
63421
63422          #include<ft2build.h>
63423          #include FT_FREETYPE_H
63424          int main () {
63425            FT_Init_FreeType(NULL);
63426            return 0;
63427          }
63428
63429_ACEOF
63430if ac_fn_cxx_try_link "$LINENO"; then :
63431
63432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63433$as_echo "yes" >&6; }
63434
63435else
63436
63437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63438$as_echo "no" >&6; }
63439          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63440$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63441          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63442$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63443
63444
63445  # Print a helpful message on how to acquire the necessary build dependency.
63446  # freetype is the help tag: freetype, cups, alsa etc
63447  MISSING_DEPENDENCY=freetype
63448
63449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63450    cygwin_help $MISSING_DEPENDENCY
63451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63452    msys_help $MISSING_DEPENDENCY
63453  else
63454    PKGHANDLER_COMMAND=
63455
63456    case $PKGHANDLER in
63457      apt-get)
63458        apt_help     $MISSING_DEPENDENCY ;;
63459      yum)
63460        yum_help     $MISSING_DEPENDENCY ;;
63461      brew)
63462        brew_help    $MISSING_DEPENDENCY ;;
63463      port)
63464        port_help    $MISSING_DEPENDENCY ;;
63465      pkgutil)
63466        pkgutil_help $MISSING_DEPENDENCY ;;
63467      pkgadd)
63468        pkgadd_help  $MISSING_DEPENDENCY ;;
63469    esac
63470
63471    if test "x$PKGHANDLER_COMMAND" != x; then
63472      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63473    fi
63474  fi
63475
63476
63477          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63478
63479
63480fi
63481rm -f core conftest.err conftest.$ac_objext \
63482    conftest$ac_exeext conftest.$ac_ext
63483    CXXCFLAGS="$PREV_CXXFLAGS"
63484    LIBS="$PREV_LIBS"
63485    CXX="$PREV_CXX"
63486    ac_ext=cpp
63487ac_cpp='$CXXCPP $CPPFLAGS'
63488ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63489ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63490ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63491
63492
63493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63494$as_echo_n "checking if we should bundle freetype... " >&6; }
63495    if test "x$BUNDLE_FREETYPE" = xyes; then
63496      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63497    fi
63498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63499$as_echo "$BUNDLE_FREETYPE" >&6; }
63500
63501  fi # end freetype needed
63502
63503
63504
63505
63506
63507
63508
63509# Check whether --with-alsa was given.
63510if test "${with_alsa+set}" = set; then :
63511  withval=$with_alsa;
63512fi
63513
63514
63515# Check whether --with-alsa-include was given.
63516if test "${with_alsa_include+set}" = set; then :
63517  withval=$with_alsa_include;
63518fi
63519
63520
63521# Check whether --with-alsa-lib was given.
63522if test "${with_alsa_lib+set}" = set; then :
63523  withval=$with_alsa_lib;
63524fi
63525
63526
63527  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63528    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63529        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63530        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63531      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63532$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63533    fi
63534    ALSA_CFLAGS=
63535    ALSA_LIBS=
63536  else
63537    ALSA_FOUND=no
63538
63539    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63540      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63541    fi
63542
63543    if test "x${with_alsa}" != x; then
63544      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63545      ALSA_CFLAGS="-I${with_alsa}/include"
63546      ALSA_FOUND=yes
63547    fi
63548    if test "x${with_alsa_include}" != x; then
63549      ALSA_CFLAGS="-I${with_alsa_include}"
63550      ALSA_FOUND=yes
63551    fi
63552    if test "x${with_alsa_lib}" != x; then
63553      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63554      ALSA_FOUND=yes
63555    fi
63556    # Do not try pkg-config if we have a sysroot set.
63557    if test "x$SYSROOT" = x; then
63558      if test "x$ALSA_FOUND" = xno; then
63559
63560pkg_failed=no
63561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63562$as_echo_n "checking for ALSA... " >&6; }
63563
63564if test -n "$ALSA_CFLAGS"; then
63565    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63566 elif test -n "$PKG_CONFIG"; then
63567    if test -n "$PKG_CONFIG" && \
63568    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63569  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63570  ac_status=$?
63571  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63572  test $ac_status = 0; }; then
63573  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63574else
63575  pkg_failed=yes
63576fi
63577 else
63578    pkg_failed=untried
63579fi
63580if test -n "$ALSA_LIBS"; then
63581    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63582 elif test -n "$PKG_CONFIG"; then
63583    if test -n "$PKG_CONFIG" && \
63584    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63585  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63586  ac_status=$?
63587  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63588  test $ac_status = 0; }; then
63589  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63590else
63591  pkg_failed=yes
63592fi
63593 else
63594    pkg_failed=untried
63595fi
63596
63597
63598
63599if test $pkg_failed = yes; then
63600
63601if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63602        _pkg_short_errors_supported=yes
63603else
63604        _pkg_short_errors_supported=no
63605fi
63606        if test $_pkg_short_errors_supported = yes; then
63607	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63608        else
63609	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63610        fi
63611	# Put the nasty error message in config.log where it belongs
63612	echo "$ALSA_PKG_ERRORS" >&5
63613
63614	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63615$as_echo "no" >&6; }
63616                ALSA_FOUND=no
63617elif test $pkg_failed = untried; then
63618	ALSA_FOUND=no
63619else
63620	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63621	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63623$as_echo "yes" >&6; }
63624	ALSA_FOUND=yes
63625fi
63626      fi
63627    fi
63628    if test "x$ALSA_FOUND" = xno; then
63629      for ac_header in alsa/asoundlib.h
63630do :
63631  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63632if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63633  cat >>confdefs.h <<_ACEOF
63634#define HAVE_ALSA_ASOUNDLIB_H 1
63635_ACEOF
63636
63637            ALSA_FOUND=yes
63638            ALSA_CFLAGS=-Iignoreme
63639            ALSA_LIBS=-lasound
63640            DEFAULT_ALSA=yes
63641
63642else
63643  ALSA_FOUND=no
63644
63645fi
63646
63647done
63648
63649    fi
63650    if test "x$ALSA_FOUND" = xno; then
63651
63652  # Print a helpful message on how to acquire the necessary build dependency.
63653  # alsa is the help tag: freetype, cups, alsa etc
63654  MISSING_DEPENDENCY=alsa
63655
63656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63657    cygwin_help $MISSING_DEPENDENCY
63658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63659    msys_help $MISSING_DEPENDENCY
63660  else
63661    PKGHANDLER_COMMAND=
63662
63663    case $PKGHANDLER in
63664      apt-get)
63665        apt_help     $MISSING_DEPENDENCY ;;
63666      yum)
63667        yum_help     $MISSING_DEPENDENCY ;;
63668      brew)
63669        brew_help    $MISSING_DEPENDENCY ;;
63670      port)
63671        port_help    $MISSING_DEPENDENCY ;;
63672      pkgutil)
63673        pkgutil_help $MISSING_DEPENDENCY ;;
63674      pkgadd)
63675        pkgadd_help  $MISSING_DEPENDENCY ;;
63676    esac
63677
63678    if test "x$PKGHANDLER_COMMAND" != x; then
63679      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63680    fi
63681  fi
63682
63683      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63684    fi
63685  fi
63686
63687
63688
63689
63690
63691
63692# Check whether --with-libffi was given.
63693if test "${with_libffi+set}" = set; then :
63694  withval=$with_libffi;
63695fi
63696
63697
63698# Check whether --with-libffi-include was given.
63699if test "${with_libffi_include+set}" = set; then :
63700  withval=$with_libffi_include;
63701fi
63702
63703
63704# Check whether --with-libffi-lib was given.
63705if test "${with_libffi_lib+set}" = set; then :
63706  withval=$with_libffi_lib;
63707fi
63708
63709  # Check whether --enable-libffi-bundling was given.
63710if test "${enable_libffi_bundling+set}" = set; then :
63711  enableval=$enable_libffi_bundling;
63712fi
63713
63714
63715  if test "x$NEEDS_LIB_FFI" = xfalse; then
63716    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63717        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63718        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63719      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63720$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63721    fi
63722    LIBFFI_CFLAGS=
63723    LIBFFI_LIBS=
63724  else
63725    LIBFFI_FOUND=no
63726
63727    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63728      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63729    fi
63730
63731    if test "x${with_libffi}" != x; then
63732      LIBFFI_LIB_PATH="${with_libffi}/lib"
63733      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63734      LIBFFI_CFLAGS="-I${with_libffi}/include"
63735      LIBFFI_FOUND=yes
63736    fi
63737    if test "x${with_libffi_include}" != x; then
63738      LIBFFI_CFLAGS="-I${with_libffi_include}"
63739      LIBFFI_FOUND=yes
63740    fi
63741    if test "x${with_libffi_lib}" != x; then
63742      LIBFFI_LIB_PATH="${with_libffi_lib}"
63743      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63744      LIBFFI_FOUND=yes
63745    fi
63746    # Do not try pkg-config if we have a sysroot set.
63747    if test "x$SYSROOT" = x; then
63748      if test "x$LIBFFI_FOUND" = xno; then
63749        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63750
63751pkg_failed=no
63752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63753$as_echo_n "checking for LIBFFI... " >&6; }
63754
63755if test -n "$LIBFFI_CFLAGS"; then
63756    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63757 elif test -n "$PKG_CONFIG"; then
63758    if test -n "$PKG_CONFIG" && \
63759    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63760  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63761  ac_status=$?
63762  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63763  test $ac_status = 0; }; then
63764  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63765else
63766  pkg_failed=yes
63767fi
63768 else
63769    pkg_failed=untried
63770fi
63771if test -n "$LIBFFI_LIBS"; then
63772    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63773 elif test -n "$PKG_CONFIG"; then
63774    if test -n "$PKG_CONFIG" && \
63775    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63776  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63777  ac_status=$?
63778  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63779  test $ac_status = 0; }; then
63780  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63781else
63782  pkg_failed=yes
63783fi
63784 else
63785    pkg_failed=untried
63786fi
63787
63788
63789
63790if test $pkg_failed = yes; then
63791
63792if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63793        _pkg_short_errors_supported=yes
63794else
63795        _pkg_short_errors_supported=no
63796fi
63797        if test $_pkg_short_errors_supported = yes; then
63798	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63799        else
63800	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63801        fi
63802	# Put the nasty error message in config.log where it belongs
63803	echo "$LIBFFI_PKG_ERRORS" >&5
63804
63805	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63806$as_echo "no" >&6; }
63807                LIBFFI_FOUND=no
63808elif test $pkg_failed = untried; then
63809	LIBFFI_FOUND=no
63810else
63811	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63812	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63814$as_echo "yes" >&6; }
63815	LIBFFI_FOUND=yes
63816fi
63817      fi
63818    fi
63819    if test "x$LIBFFI_FOUND" = xno; then
63820      for ac_header in ffi.h
63821do :
63822  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63823if test "x$ac_cv_header_ffi_h" = xyes; then :
63824  cat >>confdefs.h <<_ACEOF
63825#define HAVE_FFI_H 1
63826_ACEOF
63827
63828            LIBFFI_FOUND=yes
63829            LIBFFI_CFLAGS=
63830            LIBFFI_LIBS=-lffi
63831
63832else
63833  LIBFFI_FOUND=no
63834
63835fi
63836
63837done
63838
63839    fi
63840    if test "x$LIBFFI_FOUND" = xno; then
63841
63842  # Print a helpful message on how to acquire the necessary build dependency.
63843  # ffi is the help tag: freetype, cups, alsa etc
63844  MISSING_DEPENDENCY=ffi
63845
63846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63847    cygwin_help $MISSING_DEPENDENCY
63848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63849    msys_help $MISSING_DEPENDENCY
63850  else
63851    PKGHANDLER_COMMAND=
63852
63853    case $PKGHANDLER in
63854      apt-get)
63855        apt_help     $MISSING_DEPENDENCY ;;
63856      yum)
63857        yum_help     $MISSING_DEPENDENCY ;;
63858      brew)
63859        brew_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 $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63874    fi
63875
63876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63877$as_echo_n "checking if libffi works... " >&6; }
63878    ac_ext=c
63879ac_cpp='$CPP $CPPFLAGS'
63880ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63881ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63882ac_compiler_gnu=$ac_cv_c_compiler_gnu
63883
63884    OLD_CFLAGS="$CFLAGS"
63885    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63886    OLD_LIBS="$LIBS"
63887    LIBS="$LIBS $LIBFFI_LIBS"
63888    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63889/* end confdefs.h.  */
63890#include <ffi.h>
63891int
63892main ()
63893{
63894
63895          ffi_call(NULL, NULL, NULL, NULL);
63896          return 0;
63897
63898  ;
63899  return 0;
63900}
63901_ACEOF
63902if ac_fn_c_try_link "$LINENO"; then :
63903  LIBFFI_WORKS=yes
63904else
63905  LIBFFI_WORKS=no
63906
63907fi
63908rm -f core conftest.err conftest.$ac_objext \
63909    conftest$ac_exeext conftest.$ac_ext
63910    CFLAGS="$OLD_CFLAGS"
63911    LIBS="$OLD_LIBS"
63912    ac_ext=cpp
63913ac_cpp='$CXXCPP $CPPFLAGS'
63914ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63915ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63916ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63917
63918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63919$as_echo "$LIBFFI_WORKS" >&6; }
63920
63921    if test "x$LIBFFI_WORKS" = xno; then
63922
63923  # Print a helpful message on how to acquire the necessary build dependency.
63924  # ffi is the help tag: freetype, cups, alsa etc
63925  MISSING_DEPENDENCY=ffi
63926
63927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63928    cygwin_help $MISSING_DEPENDENCY
63929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63930    msys_help $MISSING_DEPENDENCY
63931  else
63932    PKGHANDLER_COMMAND=
63933
63934    case $PKGHANDLER in
63935      apt-get)
63936        apt_help     $MISSING_DEPENDENCY ;;
63937      yum)
63938        yum_help     $MISSING_DEPENDENCY ;;
63939      brew)
63940        brew_help    $MISSING_DEPENDENCY ;;
63941      port)
63942        port_help    $MISSING_DEPENDENCY ;;
63943      pkgutil)
63944        pkgutil_help $MISSING_DEPENDENCY ;;
63945      pkgadd)
63946        pkgadd_help  $MISSING_DEPENDENCY ;;
63947    esac
63948
63949    if test "x$PKGHANDLER_COMMAND" != x; then
63950      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63951    fi
63952  fi
63953
63954      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63955    fi
63956
63957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63958$as_echo_n "checking if libffi should be bundled... " >&6; }
63959    if test "x$enable_libffi_bundling" = "x"; then
63960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63961$as_echo "no" >&6; }
63962      ENABLE_LIBFFI_BUNDLING=false
63963    elif  test "x$enable_libffi_bundling" = "xno"; then
63964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63965$as_echo "no, forced" >&6; }
63966      ENABLE_LIBFFI_BUNDLING=false
63967    elif  test "x$enable_libffi_bundling" = "xyes"; then
63968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63969$as_echo "yes, forced" >&6; }
63970      ENABLE_LIBFFI_BUNDLING=true
63971    else
63972      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63973    fi
63974
63975    # Find the libffi.so.X to bundle
63976    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63977      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63978$as_echo_n "checking for libffi lib file location... " >&6; }
63979      if test "x${LIBFFI_LIB_PATH}" != x; then
63980        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63981          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63982        else
63983          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63984        fi
63985      else
63986        # If we don't have an explicit path, look in a few obvious places
63987        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63988          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63989            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63990          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63991            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63992          else
63993            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63994          fi
63995        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63996          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63997            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63998          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63999            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64000          else
64001            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64002          fi
64003        else
64004          # Fallback on the default /usr/lib dir
64005          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64006            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64007          else
64008            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64009          fi
64010        fi
64011      fi
64012      # Make sure the wildcard is evaluated
64013      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64015$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64016    fi
64017  fi
64018
64019
64020
64021
64022
64023
64024
64025  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64026    # Extract the first word of "llvm-config", so it can be a program name with args.
64027set dummy llvm-config; ac_word=$2
64028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64029$as_echo_n "checking for $ac_word... " >&6; }
64030if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64031  $as_echo_n "(cached) " >&6
64032else
64033  if test -n "$LLVM_CONFIG"; then
64034  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64035else
64036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64037for as_dir in $PATH
64038do
64039  IFS=$as_save_IFS
64040  test -z "$as_dir" && as_dir=.
64041    for ac_exec_ext in '' $ac_executable_extensions; do
64042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64043    ac_cv_prog_LLVM_CONFIG="llvm-config"
64044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64045    break 2
64046  fi
64047done
64048  done
64049IFS=$as_save_IFS
64050
64051fi
64052fi
64053LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64054if test -n "$LLVM_CONFIG"; then
64055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64056$as_echo "$LLVM_CONFIG" >&6; }
64057else
64058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64059$as_echo "no" >&6; }
64060fi
64061
64062
64063
64064    if test "x$LLVM_CONFIG" != xllvm-config; then
64065      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64066    fi
64067
64068    llvm_components="jit mcjit engine nativecodegen native"
64069    unset LLVM_CFLAGS
64070    for flag in $("$LLVM_CONFIG" --cxxflags); do
64071      if echo "${flag}" | grep -q '^-[ID]'; then
64072        if test "${flag}" != "-D_DEBUG" ; then
64073          if test "${LLVM_CFLAGS}" != "" ; then
64074            LLVM_CFLAGS="${LLVM_CFLAGS} "
64075          fi
64076          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64077        fi
64078      fi
64079    done
64080    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64081    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64082
64083    unset LLVM_LDFLAGS
64084    for flag in $("${LLVM_CONFIG}" --ldflags); do
64085      if echo "${flag}" | grep -q '^-L'; then
64086        if test "${LLVM_LDFLAGS}" != ""; then
64087          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64088        fi
64089        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64090      fi
64091    done
64092
64093    unset LLVM_LIBS
64094    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64095      if echo "${flag}" | grep -q '^-l'; then
64096        if test "${LLVM_LIBS}" != ""; then
64097          LLVM_LIBS="${LLVM_LIBS} "
64098        fi
64099        LLVM_LIBS="${LLVM_LIBS}${flag}"
64100      fi
64101    done
64102
64103    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64104    # always properly detect -ltinfo
64105    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64106
64107
64108
64109
64110  fi
64111
64112
64113
64114# Check whether --with-libjpeg was given.
64115if test "${with_libjpeg+set}" = set; then :
64116  withval=$with_libjpeg;
64117fi
64118
64119
64120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64121$as_echo_n "checking for which libjpeg to use... " >&6; }
64122  # default is bundled
64123  DEFAULT_LIBJPEG=bundled
64124  # if user didn't specify, use DEFAULT_LIBJPEG
64125  if test "x${with_libjpeg}" = "x"; then
64126    with_libjpeg=${DEFAULT_LIBJPEG}
64127  fi
64128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64129$as_echo "${with_libjpeg}" >&6; }
64130
64131  if test "x${with_libjpeg}" = "xbundled"; then
64132    USE_EXTERNAL_LIBJPEG=false
64133  elif test "x${with_libjpeg}" = "xsystem"; then
64134    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64135if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64136
64137else
64138   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64139fi
64140
64141
64142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64143$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64144if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64145  $as_echo_n "(cached) " >&6
64146else
64147  ac_check_lib_save_LIBS=$LIBS
64148LIBS="-ljpeg  $LIBS"
64149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64150/* end confdefs.h.  */
64151
64152/* Override any GCC internal prototype to avoid an error.
64153   Use char because int might match the return type of a GCC
64154   builtin and then its argument prototype would still apply.  */
64155#ifdef __cplusplus
64156extern "C"
64157#endif
64158char jpeg_CreateDecompress ();
64159int
64160main ()
64161{
64162return jpeg_CreateDecompress ();
64163  ;
64164  return 0;
64165}
64166_ACEOF
64167if ac_fn_cxx_try_link "$LINENO"; then :
64168  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64169else
64170  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64171fi
64172rm -f core conftest.err conftest.$ac_objext \
64173    conftest$ac_exeext conftest.$ac_ext
64174LIBS=$ac_check_lib_save_LIBS
64175fi
64176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64177$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64178if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64179  cat >>confdefs.h <<_ACEOF
64180#define HAVE_LIBJPEG 1
64181_ACEOF
64182
64183  LIBS="-ljpeg $LIBS"
64184
64185else
64186   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64187fi
64188
64189
64190    USE_EXTERNAL_LIBJPEG=true
64191  else
64192    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64193  fi
64194
64195
64196
64197
64198
64199# Check whether --with-giflib was given.
64200if test "${with_giflib+set}" = set; then :
64201  withval=$with_giflib;
64202fi
64203
64204
64205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64206$as_echo_n "checking for which giflib to use... " >&6; }
64207  # default is bundled
64208  DEFAULT_GIFLIB=bundled
64209  # if user didn't specify, use DEFAULT_GIFLIB
64210  if test "x${with_giflib}" = "x"; then
64211    with_giflib=${DEFAULT_GIFLIB}
64212  fi
64213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64214$as_echo "${with_giflib}" >&6; }
64215
64216  if test "x${with_giflib}" = "xbundled"; then
64217    USE_EXTERNAL_LIBGIF=false
64218  elif test "x${with_giflib}" = "xsystem"; then
64219    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64220if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64221
64222else
64223   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64224fi
64225
64226
64227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64228$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64229if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64230  $as_echo_n "(cached) " >&6
64231else
64232  ac_check_lib_save_LIBS=$LIBS
64233LIBS="-lgif  $LIBS"
64234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64235/* end confdefs.h.  */
64236
64237/* Override any GCC internal prototype to avoid an error.
64238   Use char because int might match the return type of a GCC
64239   builtin and then its argument prototype would still apply.  */
64240#ifdef __cplusplus
64241extern "C"
64242#endif
64243char DGifGetCode ();
64244int
64245main ()
64246{
64247return DGifGetCode ();
64248  ;
64249  return 0;
64250}
64251_ACEOF
64252if ac_fn_cxx_try_link "$LINENO"; then :
64253  ac_cv_lib_gif_DGifGetCode=yes
64254else
64255  ac_cv_lib_gif_DGifGetCode=no
64256fi
64257rm -f core conftest.err conftest.$ac_objext \
64258    conftest$ac_exeext conftest.$ac_ext
64259LIBS=$ac_check_lib_save_LIBS
64260fi
64261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64262$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64263if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64264  cat >>confdefs.h <<_ACEOF
64265#define HAVE_LIBGIF 1
64266_ACEOF
64267
64268  LIBS="-lgif $LIBS"
64269
64270else
64271   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64272fi
64273
64274
64275    USE_EXTERNAL_LIBGIF=true
64276  else
64277    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64278  fi
64279
64280
64281
64282
64283
64284# Check whether --with-libpng was given.
64285if test "${with_libpng+set}" = set; then :
64286  withval=$with_libpng;
64287fi
64288
64289
64290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64291$as_echo_n "checking for which libpng to use... " >&6; }
64292
64293  # default is bundled
64294  DEFAULT_LIBPNG=bundled
64295  # if user didn't specify, use DEFAULT_LIBPNG
64296  if test "x${with_libpng}" = "x"; then
64297    with_libpng=${DEFAULT_LIBPNG}
64298  fi
64299
64300  if test "x${with_libpng}" = "xbundled"; then
64301    USE_EXTERNAL_LIBPNG=false
64302    PNG_CFLAGS=""
64303    PNG_LIBS=""
64304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64305$as_echo "bundled" >&6; }
64306  elif test "x${with_libpng}" = "xsystem"; then
64307
64308pkg_failed=no
64309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64310$as_echo_n "checking for PNG... " >&6; }
64311
64312if test -n "$PNG_CFLAGS"; then
64313    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64314 elif test -n "$PKG_CONFIG"; then
64315    if test -n "$PKG_CONFIG" && \
64316    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64317  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64318  ac_status=$?
64319  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64320  test $ac_status = 0; }; then
64321  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64322else
64323  pkg_failed=yes
64324fi
64325 else
64326    pkg_failed=untried
64327fi
64328if test -n "$PNG_LIBS"; then
64329    pkg_cv_PNG_LIBS="$PNG_LIBS"
64330 elif test -n "$PKG_CONFIG"; then
64331    if test -n "$PKG_CONFIG" && \
64332    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64333  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64334  ac_status=$?
64335  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64336  test $ac_status = 0; }; then
64337  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64338else
64339  pkg_failed=yes
64340fi
64341 else
64342    pkg_failed=untried
64343fi
64344
64345
64346
64347if test $pkg_failed = yes; then
64348
64349if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64350        _pkg_short_errors_supported=yes
64351else
64352        _pkg_short_errors_supported=no
64353fi
64354        if test $_pkg_short_errors_supported = yes; then
64355	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64356        else
64357	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64358        fi
64359	# Put the nasty error message in config.log where it belongs
64360	echo "$PNG_PKG_ERRORS" >&5
64361
64362	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64363$as_echo "no" >&6; }
64364                LIBPNG_FOUND=no
64365elif test $pkg_failed = untried; then
64366	LIBPNG_FOUND=no
64367else
64368	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64369	PNG_LIBS=$pkg_cv_PNG_LIBS
64370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64371$as_echo "yes" >&6; }
64372	LIBPNG_FOUND=yes
64373fi
64374    if test "x${LIBPNG_FOUND}" = "xyes"; then
64375      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64376      USE_EXTERNAL_LIBPNG=true
64377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64378$as_echo "system" >&6; }
64379    else
64380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64381$as_echo "system not found" >&6; }
64382      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64383    fi
64384  else
64385    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64386  fi
64387
64388
64389
64390
64391
64392
64393
64394# Check whether --with-zlib was given.
64395if test "${with_zlib+set}" = set; then :
64396  withval=$with_zlib;
64397fi
64398
64399
64400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64401$as_echo_n "checking for compress in -lz... " >&6; }
64402if ${ac_cv_lib_z_compress+:} false; then :
64403  $as_echo_n "(cached) " >&6
64404else
64405  ac_check_lib_save_LIBS=$LIBS
64406LIBS="-lz  $LIBS"
64407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64408/* end confdefs.h.  */
64409
64410/* Override any GCC internal prototype to avoid an error.
64411   Use char because int might match the return type of a GCC
64412   builtin and then its argument prototype would still apply.  */
64413#ifdef __cplusplus
64414extern "C"
64415#endif
64416char compress ();
64417int
64418main ()
64419{
64420return compress ();
64421  ;
64422  return 0;
64423}
64424_ACEOF
64425if ac_fn_cxx_try_link "$LINENO"; then :
64426  ac_cv_lib_z_compress=yes
64427else
64428  ac_cv_lib_z_compress=no
64429fi
64430rm -f core conftest.err conftest.$ac_objext \
64431    conftest$ac_exeext conftest.$ac_ext
64432LIBS=$ac_check_lib_save_LIBS
64433fi
64434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64435$as_echo "$ac_cv_lib_z_compress" >&6; }
64436if test "x$ac_cv_lib_z_compress" = xyes; then :
64437   ZLIB_FOUND=yes
64438else
64439   ZLIB_FOUND=no
64440fi
64441
64442
64443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64444$as_echo_n "checking for which zlib to use... " >&6; }
64445
64446  DEFAULT_ZLIB=system
64447  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64448    # On windows default is bundled...on others default is system
64449    DEFAULT_ZLIB=bundled
64450  fi
64451
64452  if test "x${ZLIB_FOUND}" != "xyes"; then
64453    # If we don't find any system...set default to bundled
64454    DEFAULT_ZLIB=bundled
64455  fi
64456
64457  # If user didn't specify, use DEFAULT_ZLIB
64458  if test "x${with_zlib}" = "x"; then
64459    with_zlib=${DEFAULT_ZLIB}
64460  fi
64461
64462  if test "x${with_zlib}" = "xbundled"; then
64463    USE_EXTERNAL_LIBZ=false
64464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64465$as_echo "bundled" >&6; }
64466  elif test "x${with_zlib}" = "xsystem"; then
64467    if test "x${ZLIB_FOUND}" = "xyes"; then
64468      USE_EXTERNAL_LIBZ=true
64469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64470$as_echo "system" >&6; }
64471    else
64472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64473$as_echo "system not found" >&6; }
64474      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64475    fi
64476  else
64477    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64478  fi
64479
64480
64481
64482
64483
64484# Check whether --with-lcms was given.
64485if test "${with_lcms+set}" = set; then :
64486  withval=$with_lcms;
64487fi
64488
64489
64490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64491$as_echo_n "checking for which lcms to use... " >&6; }
64492
64493  DEFAULT_LCMS=bundled
64494  # If user didn't specify, use DEFAULT_LCMS
64495  if test "x${with_lcms}" = "x"; then
64496    with_lcms=${DEFAULT_LCMS}
64497  fi
64498
64499  if test "x${with_lcms}" = "xbundled"; then
64500    USE_EXTERNAL_LCMS=false
64501    LCMS_CFLAGS=""
64502    LCMS_LIBS=""
64503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64504$as_echo "bundled" >&6; }
64505  elif test "x${with_lcms}" = "xsystem"; then
64506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64507$as_echo "system" >&6; }
64508
64509pkg_failed=no
64510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64511$as_echo_n "checking for LCMS... " >&6; }
64512
64513if test -n "$LCMS_CFLAGS"; then
64514    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64515 elif test -n "$PKG_CONFIG"; then
64516    if test -n "$PKG_CONFIG" && \
64517    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64518  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64519  ac_status=$?
64520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64521  test $ac_status = 0; }; then
64522  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64523else
64524  pkg_failed=yes
64525fi
64526 else
64527    pkg_failed=untried
64528fi
64529if test -n "$LCMS_LIBS"; then
64530    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64531 elif test -n "$PKG_CONFIG"; then
64532    if test -n "$PKG_CONFIG" && \
64533    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64534  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64535  ac_status=$?
64536  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64537  test $ac_status = 0; }; then
64538  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64539else
64540  pkg_failed=yes
64541fi
64542 else
64543    pkg_failed=untried
64544fi
64545
64546
64547
64548if test $pkg_failed = yes; then
64549
64550if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64551        _pkg_short_errors_supported=yes
64552else
64553        _pkg_short_errors_supported=no
64554fi
64555        if test $_pkg_short_errors_supported = yes; then
64556	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64557        else
64558	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64559        fi
64560	# Put the nasty error message in config.log where it belongs
64561	echo "$LCMS_PKG_ERRORS" >&5
64562
64563	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64564$as_echo "no" >&6; }
64565                LCMS_FOUND=no
64566elif test $pkg_failed = untried; then
64567	LCMS_FOUND=no
64568else
64569	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64570	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64572$as_echo "yes" >&6; }
64573	LCMS_FOUND=yes
64574fi
64575    if test "x${LCMS_FOUND}" = "xyes"; then
64576      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64577      USE_EXTERNAL_LCMS=true
64578    else
64579      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64580    fi
64581  else
64582    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64583  fi
64584
64585
64586
64587
64588
64589
64590
64591
64592
64593
64594
64595
64596
64597  # Setup libm (the maths library)
64598  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64600$as_echo_n "checking for cos in -lm... " >&6; }
64601if ${ac_cv_lib_m_cos+:} false; then :
64602  $as_echo_n "(cached) " >&6
64603else
64604  ac_check_lib_save_LIBS=$LIBS
64605LIBS="-lm  $LIBS"
64606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64607/* end confdefs.h.  */
64608
64609/* Override any GCC internal prototype to avoid an error.
64610   Use char because int might match the return type of a GCC
64611   builtin and then its argument prototype would still apply.  */
64612#ifdef __cplusplus
64613extern "C"
64614#endif
64615char cos ();
64616int
64617main ()
64618{
64619return cos ();
64620  ;
64621  return 0;
64622}
64623_ACEOF
64624if ac_fn_cxx_try_link "$LINENO"; then :
64625  ac_cv_lib_m_cos=yes
64626else
64627  ac_cv_lib_m_cos=no
64628fi
64629rm -f core conftest.err conftest.$ac_objext \
64630    conftest$ac_exeext conftest.$ac_ext
64631LIBS=$ac_check_lib_save_LIBS
64632fi
64633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64634$as_echo "$ac_cv_lib_m_cos" >&6; }
64635if test "x$ac_cv_lib_m_cos" = xyes; then :
64636  cat >>confdefs.h <<_ACEOF
64637#define HAVE_LIBM 1
64638_ACEOF
64639
64640  LIBS="-lm $LIBS"
64641
64642else
64643
64644        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64645$as_echo "$as_me: Maths library was not found" >&6;}
64646
64647fi
64648
64649    LIBM="-lm"
64650  else
64651    LIBM=""
64652  fi
64653
64654
64655  # Setup libdl (for dynamic library loading)
64656  save_LIBS="$LIBS"
64657  LIBS=""
64658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64659$as_echo_n "checking for dlopen in -ldl... " >&6; }
64660if ${ac_cv_lib_dl_dlopen+:} false; then :
64661  $as_echo_n "(cached) " >&6
64662else
64663  ac_check_lib_save_LIBS=$LIBS
64664LIBS="-ldl  $LIBS"
64665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64666/* end confdefs.h.  */
64667
64668/* Override any GCC internal prototype to avoid an error.
64669   Use char because int might match the return type of a GCC
64670   builtin and then its argument prototype would still apply.  */
64671#ifdef __cplusplus
64672extern "C"
64673#endif
64674char dlopen ();
64675int
64676main ()
64677{
64678return dlopen ();
64679  ;
64680  return 0;
64681}
64682_ACEOF
64683if ac_fn_cxx_try_link "$LINENO"; then :
64684  ac_cv_lib_dl_dlopen=yes
64685else
64686  ac_cv_lib_dl_dlopen=no
64687fi
64688rm -f core conftest.err conftest.$ac_objext \
64689    conftest$ac_exeext conftest.$ac_ext
64690LIBS=$ac_check_lib_save_LIBS
64691fi
64692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64693$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64694if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64695  cat >>confdefs.h <<_ACEOF
64696#define HAVE_LIBDL 1
64697_ACEOF
64698
64699  LIBS="-ldl $LIBS"
64700
64701fi
64702
64703  LIBDL="$LIBS"
64704
64705  LIBS="$save_LIBS"
64706
64707  # Deprecated libraries, keep the flags for backwards compatibility
64708  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64709
64710
64711# Check whether --with-dxsdk was given.
64712if test "${with_dxsdk+set}" = set; then :
64713  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64714$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64715fi
64716
64717
64718
64719
64720# Check whether --with-dxsdk-lib was given.
64721if test "${with_dxsdk_lib+set}" = set; then :
64722  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64723$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64724fi
64725
64726
64727
64728
64729# Check whether --with-dxsdk-include was given.
64730if test "${with_dxsdk_include+set}" = set; then :
64731  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64732$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64733fi
64734
64735
64736  fi
64737
64738  # Control if libzip can use mmap. Available for purposes of overriding.
64739  LIBZIP_CAN_USE_MMAP=true
64740
64741
64742
64743  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64744    # Find the root of the Solaris Studio installation from the compiler path
64745    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64746    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64748$as_echo_n "checking for libstlport.so.1... " >&6; }
64749    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64750      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64751      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64752    fi
64753    if test -f "$STLPORT_LIB"; then
64754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64755$as_echo "yes, $STLPORT_LIB" >&6; }
64756
64757  # Only process if variable expands to non-empty
64758
64759  if test "x$STLPORT_LIB" != x; then
64760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64761
64762  # Input might be given as Windows format, start by converting to
64763  # unix format.
64764  path="$STLPORT_LIB"
64765  new_path=`$CYGPATH -u "$path"`
64766
64767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64770  # "foo.exe" is OK but "foo" is an error.
64771  #
64772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64773  # It is also a way to make sure we got the proper file name for the real test later on.
64774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64775  if test "x$test_shortpath" = x; then
64776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64777$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64778    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64779  fi
64780
64781  # Call helper function which possibly converts this using DOS-style short mode.
64782  # If so, the updated path is stored in $new_path.
64783
64784  input_path="$new_path"
64785  # Check if we need to convert this using DOS-style short mode. If the path
64786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64787  # take no chances and rewrite it.
64788  # Note: m4 eats our [], so we need to use [ and ] instead.
64789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64790  if test "x$has_forbidden_chars" != x; then
64791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64795      # Going to short mode and back again did indeed matter. Since short mode is
64796      # case insensitive, let's make it lowercase to improve readability.
64797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64798      # Now convert it back to Unix-style (cygpath)
64799      input_path=`$CYGPATH -u "$shortmode_path"`
64800      new_path="$input_path"
64801    fi
64802  fi
64803
64804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64805  if test "x$test_cygdrive_prefix" = x; then
64806    # As a simple fix, exclude /usr/bin since it's not a real path.
64807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64809      # a path prefixed by /cygdrive for fixpath to work.
64810      new_path="$CYGWIN_ROOT_PATH$input_path"
64811    fi
64812  fi
64813
64814
64815  if test "x$path" != "x$new_path"; then
64816    STLPORT_LIB="$new_path"
64817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64818$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64819  fi
64820
64821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64822
64823  path="$STLPORT_LIB"
64824  has_colon=`$ECHO $path | $GREP ^.:`
64825  new_path="$path"
64826  if test "x$has_colon" = x; then
64827    # Not in mixed or Windows style, start by that.
64828    new_path=`cmd //c echo $path`
64829  fi
64830
64831
64832  input_path="$new_path"
64833  # Check if we need to convert this using DOS-style short mode. If the path
64834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64835  # take no chances and rewrite it.
64836  # Note: m4 eats our [], so we need to use [ and ] instead.
64837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64838  if test "x$has_forbidden_chars" != x; then
64839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64841  fi
64842
64843
64844  windows_path="$new_path"
64845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64846    unix_path=`$CYGPATH -u "$windows_path"`
64847    new_path="$unix_path"
64848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64850    new_path="$unix_path"
64851  fi
64852
64853  if test "x$path" != "x$new_path"; then
64854    STLPORT_LIB="$new_path"
64855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64856$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64857  fi
64858
64859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64861
64862    else
64863      # We're on a unix platform. Hooray! :)
64864      path="$STLPORT_LIB"
64865      has_space=`$ECHO "$path" | $GREP " "`
64866      if test "x$has_space" != x; then
64867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64868$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64870      fi
64871
64872      # Use eval to expand a potential ~
64873      eval path="$path"
64874      if test ! -f "$path" && test ! -d "$path"; then
64875        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64876      fi
64877
64878      if test -d "$path"; then
64879        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64880      else
64881        dir="`$DIRNAME "$path"`"
64882        base="`$BASENAME "$path"`"
64883        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64884      fi
64885    fi
64886  fi
64887
64888    else
64889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64890$as_echo "no, not found at $STLPORT_LIB" >&6; }
64891      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64892    fi
64893
64894  fi
64895
64896
64897
64898# Check whether --with-libelf was given.
64899if test "${with_libelf+set}" = set; then :
64900  withval=$with_libelf;
64901fi
64902
64903
64904# Check whether --with-libelf-include was given.
64905if test "${with_libelf_include+set}" = set; then :
64906  withval=$with_libelf_include;
64907fi
64908
64909
64910# Check whether --with-libelf-lib was given.
64911if test "${with_libelf_lib+set}" = set; then :
64912  withval=$with_libelf_lib;
64913fi
64914
64915
64916  if test "x$ENABLE_AOT" = xfalse; then
64917    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64918        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64919        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64920      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64921$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64922    fi
64923    LIBELF_CFLAGS=
64924    LIBELF_LIBS=
64925  else
64926    LIBELF_FOUND=no
64927
64928    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64929      ENABLE_AOT="false"
64930      if test "x${enable_aot}" = xyes; then
64931        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64932      fi
64933    else
64934      if test "x${with_libelf}" != x; then
64935        ELF_LIBS="-L${with_libelf}/lib -lelf"
64936        ELF_CFLAGS="-I${with_libelf}/include"
64937        LIBELF_FOUND=yes
64938      fi
64939      if test "x${with_libelf_include}" != x; then
64940        ELF_CFLAGS="-I${with_libelf_include}"
64941        LIBELF_FOUND=yes
64942      fi
64943      if test "x${with_libelf_lib}" != x; then
64944        ELF_LIBS="-L${with_libelf_lib} -lelf"
64945        LIBELF_FOUND=yes
64946      fi
64947      # Do not try pkg-config if we have a sysroot set.
64948      if test "x$SYSROOT" = x; then
64949        if test "x$LIBELF_FOUND" = xno; then
64950          # Figure out ELF_CFLAGS and ELF_LIBS
64951
64952pkg_failed=no
64953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64954$as_echo_n "checking for ELF... " >&6; }
64955
64956if test -n "$ELF_CFLAGS"; then
64957    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64958 elif test -n "$PKG_CONFIG"; then
64959    if test -n "$PKG_CONFIG" && \
64960    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64961  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64962  ac_status=$?
64963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64964  test $ac_status = 0; }; then
64965  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64966else
64967  pkg_failed=yes
64968fi
64969 else
64970    pkg_failed=untried
64971fi
64972if test -n "$ELF_LIBS"; then
64973    pkg_cv_ELF_LIBS="$ELF_LIBS"
64974 elif test -n "$PKG_CONFIG"; then
64975    if test -n "$PKG_CONFIG" && \
64976    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64977  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64978  ac_status=$?
64979  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64980  test $ac_status = 0; }; then
64981  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64982else
64983  pkg_failed=yes
64984fi
64985 else
64986    pkg_failed=untried
64987fi
64988
64989
64990
64991if test $pkg_failed = yes; then
64992
64993if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64994        _pkg_short_errors_supported=yes
64995else
64996        _pkg_short_errors_supported=no
64997fi
64998        if test $_pkg_short_errors_supported = yes; then
64999	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
65000        else
65001	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
65002        fi
65003	# Put the nasty error message in config.log where it belongs
65004	echo "$ELF_PKG_ERRORS" >&5
65005
65006	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65007$as_echo "no" >&6; }
65008                LIBELF_FOUND=no
65009elif test $pkg_failed = untried; then
65010	LIBELF_FOUND=no
65011else
65012	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
65013	ELF_LIBS=$pkg_cv_ELF_LIBS
65014        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65015$as_echo "yes" >&6; }
65016	LIBELF_FOUND=yes
65017fi
65018        fi
65019      fi
65020      if test "x$LIBELF_FOUND" = xno; then
65021        for ac_header in libelf.h
65022do :
65023  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
65024if test "x$ac_cv_header_libelf_h" = xyes; then :
65025  cat >>confdefs.h <<_ACEOF
65026#define HAVE_LIBELF_H 1
65027_ACEOF
65028
65029              LIBELF_FOUND=yes
65030              ELF_CFLAGS=
65031              ELF_LIBS=-lelf
65032
65033else
65034  LIBELF_FOUND=no
65035
65036fi
65037
65038done
65039
65040      fi
65041      if test "x$LIBELF_FOUND" = xno; then
65042        ENABLE_AOT="false"
65043
65044  # Print a helpful message on how to acquire the necessary build dependency.
65045  # elf is the help tag: freetype, cups, alsa etc
65046  MISSING_DEPENDENCY=elf
65047
65048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65049    cygwin_help $MISSING_DEPENDENCY
65050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65051    msys_help $MISSING_DEPENDENCY
65052  else
65053    PKGHANDLER_COMMAND=
65054
65055    case $PKGHANDLER in
65056      apt-get)
65057        apt_help     $MISSING_DEPENDENCY ;;
65058      yum)
65059        yum_help     $MISSING_DEPENDENCY ;;
65060      brew)
65061        brew_help    $MISSING_DEPENDENCY ;;
65062      port)
65063        port_help    $MISSING_DEPENDENCY ;;
65064      pkgutil)
65065        pkgutil_help $MISSING_DEPENDENCY ;;
65066      pkgadd)
65067        pkgadd_help  $MISSING_DEPENDENCY ;;
65068    esac
65069
65070    if test "x$PKGHANDLER_COMMAND" != x; then
65071      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65072    fi
65073  fi
65074
65075        if test "x${enable_aot}" = xyes; then
65076          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65077        else
65078          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
65079$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
65080        fi
65081      else
65082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
65083$as_echo_n "checking if libelf works... " >&6; }
65084        ac_ext=c
65085ac_cpp='$CPP $CPPFLAGS'
65086ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65087ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65088ac_compiler_gnu=$ac_cv_c_compiler_gnu
65089
65090        OLD_CFLAGS="$CFLAGS"
65091        CFLAGS="$CFLAGS $ELF_CFLAGS"
65092        OLD_LIBS="$LIBS"
65093        LIBS="$LIBS $ELF_LIBS"
65094        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65095/* end confdefs.h.  */
65096#include <libelf.h>
65097int
65098main ()
65099{
65100
65101              elf_version(0);
65102              return 0;
65103
65104  ;
65105  return 0;
65106}
65107_ACEOF
65108if ac_fn_c_try_link "$LINENO"; then :
65109  LIBELF_WORKS=yes
65110else
65111  LIBELF_WORKS=no
65112
65113fi
65114rm -f core conftest.err conftest.$ac_objext \
65115    conftest$ac_exeext conftest.$ac_ext
65116        CFLAGS="$OLD_CFLAGS"
65117        LIBS="$OLD_LIBS"
65118        ac_ext=cpp
65119ac_cpp='$CXXCPP $CPPFLAGS'
65120ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65121ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65122ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65123
65124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
65125$as_echo "$LIBELF_WORKS" >&6; }
65126
65127        if test "x$LIBELF_WORKS" = xno; then
65128          ENABLE_AOT="false"
65129
65130  # Print a helpful message on how to acquire the necessary build dependency.
65131  # elf is the help tag: freetype, cups, alsa etc
65132  MISSING_DEPENDENCY=elf
65133
65134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65135    cygwin_help $MISSING_DEPENDENCY
65136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65137    msys_help $MISSING_DEPENDENCY
65138  else
65139    PKGHANDLER_COMMAND=
65140
65141    case $PKGHANDLER in
65142      apt-get)
65143        apt_help     $MISSING_DEPENDENCY ;;
65144      yum)
65145        yum_help     $MISSING_DEPENDENCY ;;
65146      brew)
65147        brew_help    $MISSING_DEPENDENCY ;;
65148      port)
65149        port_help    $MISSING_DEPENDENCY ;;
65150      pkgutil)
65151        pkgutil_help $MISSING_DEPENDENCY ;;
65152      pkgadd)
65153        pkgadd_help  $MISSING_DEPENDENCY ;;
65154    esac
65155
65156    if test "x$PKGHANDLER_COMMAND" != x; then
65157      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65158    fi
65159  fi
65160
65161          if test "x$enable_aot" = "xyes"; then
65162            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65163          else
65164            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
65165$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
65166          fi
65167        fi
65168      fi
65169    fi
65170  fi
65171
65172
65173
65174
65175
65176
65177
65178
65179
65180
65181
65182
65183
65184
65185
65186
65187
65188
65189# Hotspot setup depends on lib checks (AOT needs libelf).
65190
65191
65192  # The user can in some cases supply additional jvm features. For the custom
65193  # variant, this defines the entire variant.
65194
65195# Check whether --with-jvm-features was given.
65196if test "${with_jvm_features+set}" = set; then :
65197  withval=$with_jvm_features;
65198fi
65199
65200  if test "x$with_jvm_features" != x; then
65201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65202$as_echo_n "checking additional JVM features... " >&6; }
65203    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65205$as_echo "$JVM_FEATURES" >&6; }
65206  fi
65207
65208  # Override hotspot cpu definitions for ARM platforms
65209  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65210    HOTSPOT_TARGET_CPU=arm_32
65211    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65212    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65213    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65214  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65215    HOTSPOT_TARGET_CPU=arm_64
65216    HOTSPOT_TARGET_CPU_ARCH=arm
65217    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65218    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65219  fi
65220
65221  # Verify that dependencies are met for explicitly set features.
65222  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65223    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65224  fi
65225
65226  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65227    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65228  fi
65229
65230  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65231    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65232  fi
65233
65234  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65235    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65236  fi
65237
65238  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65239    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65240  fi
65241
65242  # Turn on additional features based on other parts of configure
65243  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65244    JVM_FEATURES="$JVM_FEATURES dtrace"
65245  else
65246    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65247      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65248    fi
65249  fi
65250
65251  if test "x$STATIC_BUILD" = "xtrue"; then
65252    JVM_FEATURES="$JVM_FEATURES static-build"
65253  else
65254    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65255      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65256    fi
65257  fi
65258
65259  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65260    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65261      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65262    fi
65263  fi
65264
65265  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65266    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65267      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65268    fi
65269  fi
65270
65271  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65272  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65273     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65274     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65275    JVM_FEATURES_jvmci="jvmci"
65276  else
65277    JVM_FEATURES_jvmci=""
65278  fi
65279
65280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65281$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65282  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65284$as_echo "yes, forced" >&6; }
65285    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65286      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65287    fi
65288    INCLUDE_GRAAL="true"
65289  else
65290    # By default enable graal build where AOT is available
65291    if test "x$ENABLE_AOT" = "xtrue"; then
65292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65293$as_echo "yes" >&6; }
65294      JVM_FEATURES_graal="graal"
65295      INCLUDE_GRAAL="true"
65296    else
65297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65298$as_echo "no" >&6; }
65299      JVM_FEATURES_graal=""
65300      INCLUDE_GRAAL="false"
65301    fi
65302  fi
65303
65304
65305
65306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65307$as_echo_n "checking if aot should be enabled... " >&6; }
65308  if test "x$ENABLE_AOT" = "xtrue"; then
65309    if test "x$enable_aot" = "xyes"; then
65310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65311$as_echo "yes, forced" >&6; }
65312    else
65313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65314$as_echo "yes" >&6; }
65315    fi
65316    JVM_FEATURES_aot="aot"
65317  else
65318    if test "x$enable_aot" = "xno"; then
65319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65320$as_echo "no, forced" >&6; }
65321    else
65322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65323$as_echo "no" >&6; }
65324    fi
65325    JVM_FEATURES_aot=""
65326  fi
65327
65328  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65329    # Default to use link time optimizations on minimal on arm
65330    JVM_FEATURES_link_time_opt="link-time-opt"
65331  else
65332    JVM_FEATURES_link_time_opt=""
65333  fi
65334
65335  # All variants but minimal (and custom) get these features
65336  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65337
65338  # Enable features depending on variant.
65339  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65340  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65341  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65342  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65343  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65344  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65345  JVM_FEATURES_custom="$JVM_FEATURES"
65346
65347
65348
65349
65350
65351
65352
65353
65354
65355  # Used for verification of Makefiles by check-jvm-feature
65356
65357
65358  # We don't support --with-jvm-interpreter anymore, use zero instead.
65359
65360
65361# Check whether --with-jvm-interpreter was given.
65362if test "${with_jvm_interpreter+set}" = set; then :
65363  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65364$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65365fi
65366
65367
65368
65369
65370###############################################################################
65371#
65372# We need to do some final tweaking, when everything else is done.
65373#
65374###############################################################################
65375
65376
65377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65378$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65379
65380  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65381    ENABLE_INTREE_EC=true
65382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65383$as_echo "yes" >&6; }
65384  else
65385    ENABLE_INTREE_EC=false
65386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65387$as_echo "no" >&6; }
65388  fi
65389
65390
65391
65392
65393  # Check whether --enable-jtreg-failure-handler was given.
65394if test "${enable_jtreg_failure_handler+set}" = set; then :
65395  enableval=$enable_jtreg_failure_handler;
65396fi
65397
65398
65399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65400$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65401
65402  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65403    if test "x$JT_HOME" = "x"; then
65404      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65405    else
65406      BUILD_FAILURE_HANDLER=true
65407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65408$as_echo "yes, forced" >&6; }
65409    fi
65410  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65411    BUILD_FAILURE_HANDLER=false
65412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65413$as_echo "no, forced" >&6; }
65414  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65415      || test "x$enable_jtreg_failure_handler" = "x"; then
65416    if test "x$JT_HOME" = "x"; then
65417      BUILD_FAILURE_HANDLER=false
65418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65419$as_echo "no, missing jtreg" >&6; }
65420    else
65421      BUILD_FAILURE_HANDLER=true
65422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65423$as_echo "yes, jtreg present" >&6; }
65424    fi
65425  else
65426    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65427  fi
65428
65429
65430
65431
65432  # Check whether --enable-generate-classlist was given.
65433if test "${enable_generate_classlist+set}" = set; then :
65434  enableval=$enable_generate_classlist;
65435fi
65436
65437
65438  # Check if it's likely that it's possible to generate the classlist. Depending
65439  # on exact jvm configuration it could be possible anyway.
65440  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65441    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65442  else
65443    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65444  fi
65445
65446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65447$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65448  if test "x$enable_generate_classlist" = "xyes"; then
65449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65450$as_echo "yes, forced" >&6; }
65451    ENABLE_GENERATE_CLASSLIST="true"
65452    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65453      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65454$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65455    fi
65456  elif test "x$enable_generate_classlist" = "xno"; then
65457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65458$as_echo "no, forced" >&6; }
65459    ENABLE_GENERATE_CLASSLIST="false"
65460  elif test "x$enable_generate_classlist" = "x"; then
65461    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65463$as_echo "yes" >&6; }
65464      ENABLE_GENERATE_CLASSLIST="true"
65465    else
65466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65467$as_echo "no" >&6; }
65468      ENABLE_GENERATE_CLASSLIST="false"
65469    fi
65470  else
65471    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65472  fi
65473
65474
65475
65476
65477###############################################################################
65478#
65479# Configure parts of the build that only affect the build performance,
65480# not the result.
65481#
65482###############################################################################
65483
65484
65485  # How many cores do we have on this build system?
65486
65487# Check whether --with-num-cores was given.
65488if test "${with_num_cores+set}" = set; then :
65489  withval=$with_num_cores;
65490fi
65491
65492  if test "x$with_num_cores" = x; then
65493    # The number of cores were not specified, try to probe them.
65494
65495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65496$as_echo_n "checking for number of cores... " >&6; }
65497  NUM_CORES=1
65498  FOUND_CORES=no
65499
65500  if test -f /proc/cpuinfo; then
65501    # Looks like a Linux (or cygwin) system
65502    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65503    FOUND_CORES=yes
65504  elif test -x /usr/sbin/psrinfo; then
65505    # Looks like a Solaris system
65506    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65507    FOUND_CORES=yes
65508  elif test -x /usr/sbin/sysctl; then
65509    # Looks like a MacOSX system
65510    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65511    FOUND_CORES=yes
65512  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65513    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65514    FOUND_CORES=yes
65515  elif test -n "$NUMBER_OF_PROCESSORS"; then
65516    # On windows, look in the env
65517    NUM_CORES=$NUMBER_OF_PROCESSORS
65518    FOUND_CORES=yes
65519  fi
65520
65521  if test "x$FOUND_CORES" = xyes; then
65522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65523$as_echo "$NUM_CORES" >&6; }
65524  else
65525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65526$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65527    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65528$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65529  fi
65530
65531  else
65532    NUM_CORES=$with_num_cores
65533  fi
65534
65535
65536
65537  # How much memory do we have on this build system?
65538
65539# Check whether --with-memory-size was given.
65540if test "${with_memory_size+set}" = set; then :
65541  withval=$with_memory_size;
65542fi
65543
65544  if test "x$with_memory_size" = x; then
65545    # The memory size was not specified, try to probe it.
65546
65547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65548$as_echo_n "checking for memory size... " >&6; }
65549  # Default to 1024 MB
65550  MEMORY_SIZE=1024
65551  FOUND_MEM=no
65552
65553  if test -f /proc/meminfo; then
65554    # Looks like a Linux (or cygwin) system
65555    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65556    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65557    FOUND_MEM=yes
65558  elif test -x /usr/sbin/prtconf; then
65559    # Looks like a Solaris or AIX system
65560    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65561    FOUND_MEM=yes
65562  elif test -x /usr/sbin/sysctl; then
65563    # Looks like a MacOSX system
65564    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65565    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65566    FOUND_MEM=yes
65567  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65568    # Windows, but without cygwin
65569    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65570    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65571    FOUND_MEM=yes
65572  fi
65573
65574  if test "x$FOUND_MEM" = xyes; then
65575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65576$as_echo "$MEMORY_SIZE MB" >&6; }
65577  else
65578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65579$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65580    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65581$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65582  fi
65583
65584  else
65585    MEMORY_SIZE=$with_memory_size
65586  fi
65587
65588
65589
65590  # Provide a decent default number of parallel jobs for make depending on
65591  # number of cores, amount of memory and machine architecture.
65592
65593# Check whether --with-jobs was given.
65594if test "${with_jobs+set}" = set; then :
65595  withval=$with_jobs;
65596fi
65597
65598  if test "x$with_jobs" = x; then
65599    # Number of jobs was not specified, calculate.
65600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65601$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65602    # Approximate memory in GB.
65603    memory_gb=`expr $MEMORY_SIZE / 1024`
65604    # Pick the lowest of memory in gb and number of cores.
65605    if test "$memory_gb" -lt "$NUM_CORES"; then
65606      JOBS="$memory_gb"
65607    else
65608      JOBS="$NUM_CORES"
65609    fi
65610    if test "$JOBS" -eq "0"; then
65611      JOBS=1
65612    fi
65613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65614$as_echo "$JOBS" >&6; }
65615  else
65616    JOBS=$with_jobs
65617  fi
65618
65619
65620
65621  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65622
65623# Check whether --with-test-jobs was given.
65624if test "${with_test_jobs+set}" = set; then :
65625  withval=$with_test_jobs;
65626fi
65627
65628  if test "x$with_test_jobs" = x; then
65629      TEST_JOBS=0
65630  else
65631      TEST_JOBS=$with_test_jobs
65632  fi
65633
65634
65635
65636# Setup arguments for the boot jdk (after cores and memory have been setup)
65637
65638  ##############################################################################
65639  #
65640  # Specify jvm options for anything that is run with the Boot JDK.
65641  # Not all JVM:s accept the same arguments on the command line.
65642  #
65643
65644# Check whether --with-boot-jdk-jvmargs was given.
65645if test "${with_boot_jdk_jvmargs+set}" = set; then :
65646  withval=$with_boot_jdk_jvmargs;
65647fi
65648
65649
65650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65651$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65652
65653  # Disable special log output when a debug build is used as Boot JDK...
65654
65655  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65656  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65657  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65658  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65659  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65660  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65661    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65662    JVM_ARG_OK=true
65663  else
65664    $ECHO "Arg failed:" >&5
65665    $ECHO "$OUTPUT" >&5
65666    JVM_ARG_OK=false
65667  fi
65668
65669
65670  # Force en-US environment
65671
65672  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65673  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65674  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65675  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65676  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65677  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65678    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65679    JVM_ARG_OK=true
65680  else
65681    $ECHO "Arg failed:" >&5
65682    $ECHO "$OUTPUT" >&5
65683    JVM_ARG_OK=false
65684  fi
65685
65686
65687  # Apply user provided options.
65688
65689  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65690  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65691  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65692  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65693  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65694  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65695    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65696    JVM_ARG_OK=true
65697  else
65698    $ECHO "Arg failed:" >&5
65699    $ECHO "$OUTPUT" >&5
65700    JVM_ARG_OK=false
65701  fi
65702
65703
65704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65705$as_echo "$boot_jdk_jvmargs" >&6; }
65706
65707  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65708  JAVA_FLAGS=$boot_jdk_jvmargs
65709
65710
65711
65712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65713$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65714
65715  # Starting amount of heap memory.
65716
65717  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65718  $ECHO "Command: $JAVA -Xms64M -version" >&5
65719  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65720  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65721  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65722  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65723    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65724    JVM_ARG_OK=true
65725  else
65726    $ECHO "Arg failed:" >&5
65727    $ECHO "$OUTPUT" >&5
65728    JVM_ARG_OK=false
65729  fi
65730
65731  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65732
65733  # Maximum amount of heap memory and stack size.
65734  JVM_HEAP_LIMIT_32="1024"
65735  # Running a 64 bit JVM allows for and requires a bigger heap
65736  JVM_HEAP_LIMIT_64="1600"
65737  STACK_SIZE_32=768
65738  STACK_SIZE_64=1536
65739  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65740  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65741    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65742  fi
65743  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65744    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65745  fi
65746  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65747    JVM_HEAP_LIMIT_32=512
65748    JVM_HEAP_LIMIT_64=512
65749  fi
65750
65751  if test "x$BOOT_JDK_BITS" = "x32"; then
65752    STACK_SIZE=$STACK_SIZE_32
65753    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65754  else
65755    STACK_SIZE=$STACK_SIZE_64
65756    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65757  fi
65758
65759  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65760  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65761  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65762  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65763  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65764  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65765    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65766    JVM_ARG_OK=true
65767  else
65768    $ECHO "Arg failed:" >&5
65769    $ECHO "$OUTPUT" >&5
65770    JVM_ARG_OK=false
65771  fi
65772
65773
65774  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65775  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65776  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65777  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65778  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65779  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65780    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65781    JVM_ARG_OK=true
65782  else
65783    $ECHO "Arg failed:" >&5
65784    $ECHO "$OUTPUT" >&5
65785    JVM_ARG_OK=false
65786  fi
65787
65788
65789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65790$as_echo "$boot_jdk_jvmargs_big" >&6; }
65791
65792  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65793
65794
65795  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65796    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65797    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65798  else
65799    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65800    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65801  fi
65802  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65803  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65805$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65807$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65808
65809
65810  # By default, the main javac compilations use big
65811  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65812
65813
65814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65815$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65816
65817  # Use serial gc for small short lived tools if possible
65818
65819  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65820  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65821  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65822  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65823  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65824  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65825    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65826    JVM_ARG_OK=true
65827  else
65828    $ECHO "Arg failed:" >&5
65829    $ECHO "$OUTPUT" >&5
65830    JVM_ARG_OK=false
65831  fi
65832
65833
65834  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65835  $ECHO "Command: $JAVA -Xms32M -version" >&5
65836  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65837  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65838  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65839  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65840    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65841    JVM_ARG_OK=true
65842  else
65843    $ECHO "Arg failed:" >&5
65844    $ECHO "$OUTPUT" >&5
65845    JVM_ARG_OK=false
65846  fi
65847
65848
65849  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65850  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65851  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65852  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65853  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65854  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65855    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65856    JVM_ARG_OK=true
65857  else
65858    $ECHO "Arg failed:" >&5
65859    $ECHO "$OUTPUT" >&5
65860    JVM_ARG_OK=false
65861  fi
65862
65863
65864  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65865  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65866  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65867  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65868  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65869  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65870    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65871    JVM_ARG_OK=true
65872  else
65873    $ECHO "Arg failed:" >&5
65874    $ECHO "$OUTPUT" >&5
65875    JVM_ARG_OK=false
65876  fi
65877
65878
65879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65880$as_echo "$boot_jdk_jvmargs_small" >&6; }
65881
65882  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65883
65884
65885  JAVA_TOOL_FLAGS_SMALL=""
65886  for f in $JAVA_FLAGS_SMALL; do
65887    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65888  done
65889
65890
65891
65892# Setup smart javac (after cores and memory have been setup)
65893
65894
65895# Check whether --with-sjavac-server-java was given.
65896if test "${with_sjavac_server_java+set}" = set; then :
65897  withval=$with_sjavac_server_java;
65898fi
65899
65900
65901  if test "x$with_sjavac_server_java" != x; then
65902    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65903    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65904    if test "x$FOUND_VERSION" = x; then
65905      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65906    fi
65907  else
65908    SJAVAC_SERVER_JAVA="$JAVA"
65909  fi
65910
65911
65912  if test "$MEMORY_SIZE" -gt "3000"; then
65913
65914  $ECHO "Check if jvm arg is ok: -d64" >&5
65915  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65916  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65917  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65918  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65919  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65920    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65921    JVM_ARG_OK=true
65922  else
65923    $ECHO "Arg failed:" >&5
65924    $ECHO "$OUTPUT" >&5
65925    JVM_ARG_OK=false
65926  fi
65927
65928    if test "$JVM_ARG_OK" = true; then
65929      JVM_64BIT=true
65930      JVM_ARG_OK=false
65931    fi
65932  fi
65933
65934  MX_VALUE=`expr $MEMORY_SIZE / 2`
65935  if test "$JVM_64BIT" = true; then
65936    # Set ms lower than mx since more than one instance of the server might
65937    # get launched at the same time before they figure out which instance won.
65938    MS_VALUE=512
65939    if test "$MX_VALUE" -gt "2048"; then
65940      MX_VALUE=2048
65941    fi
65942  else
65943    MS_VALUE=256
65944    if test "$MX_VALUE" -gt "1500"; then
65945      MX_VALUE=1500
65946    fi
65947  fi
65948  if test "$MX_VALUE" -lt "512"; then
65949    MX_VALUE=512
65950  fi
65951
65952  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65953  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65954  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65955  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65956  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65957  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65958    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65959    JVM_ARG_OK=true
65960  else
65961    $ECHO "Arg failed:" >&5
65962    $ECHO "$OUTPUT" >&5
65963    JVM_ARG_OK=false
65964  fi
65965
65966
65967
65968  # Check whether --enable-sjavac was given.
65969if test "${enable_sjavac+set}" = set; then :
65970  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65971else
65972  ENABLE_SJAVAC="no"
65973fi
65974
65975  if test "x$JVM_ARG_OK" = "xfalse"; then
65976    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65977$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65978    ENABLE_SJAVAC="no"
65979  fi
65980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65981$as_echo_n "checking whether to use sjavac... " >&6; }
65982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65983$as_echo "$ENABLE_SJAVAC" >&6; }
65984
65985
65986  # Check whether --enable-javac-server was given.
65987if test "${enable_javac_server+set}" = set; then :
65988  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65989else
65990  ENABLE_JAVAC_SERVER="yes"
65991fi
65992
65993  if test "x$JVM_ARG_OK" = "xfalse"; then
65994    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65995$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65996    ENABLE_JAVAC_SERVER="no"
65997  fi
65998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65999$as_echo_n "checking whether to use javac server... " >&6; }
66000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66001$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66002
66003
66004  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66005    # When using a server javac, the small client instances do not need much
66006    # resources.
66007    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66008  fi
66009
66010
66011# Setup use of icecc if requested
66012
66013  # Check whether --enable-icecc was given.
66014if test "${enable_icecc+set}" = set; then :
66015  enableval=$enable_icecc;
66016fi
66017
66018
66019  if test "x${enable_icecc}" = "xyes"; then
66020
66021
66022
66023  # Publish this variable in the help.
66024
66025
66026  if [ -z "${ICECC_CMD+x}" ]; then
66027    # The variable is not set by user, try to locate tool using the code snippet
66028    for ac_prog in icecc
66029do
66030  # Extract the first word of "$ac_prog", so it can be a program name with args.
66031set dummy $ac_prog; ac_word=$2
66032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66033$as_echo_n "checking for $ac_word... " >&6; }
66034if ${ac_cv_path_ICECC_CMD+:} false; then :
66035  $as_echo_n "(cached) " >&6
66036else
66037  case $ICECC_CMD in
66038  [\\/]* | ?:[\\/]*)
66039  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66040  ;;
66041  *)
66042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66043for as_dir in $PATH
66044do
66045  IFS=$as_save_IFS
66046  test -z "$as_dir" && as_dir=.
66047    for ac_exec_ext in '' $ac_executable_extensions; do
66048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66049    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66051    break 2
66052  fi
66053done
66054  done
66055IFS=$as_save_IFS
66056
66057  ;;
66058esac
66059fi
66060ICECC_CMD=$ac_cv_path_ICECC_CMD
66061if test -n "$ICECC_CMD"; then
66062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66063$as_echo "$ICECC_CMD" >&6; }
66064else
66065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66066$as_echo "no" >&6; }
66067fi
66068
66069
66070  test -n "$ICECC_CMD" && break
66071done
66072
66073  else
66074    # The variable is set, but is it from the command line or the environment?
66075
66076    # Try to remove the string !ICECC_CMD! from our list.
66077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66079      # If it failed, the variable was not from the command line. Ignore it,
66080      # but warn the user (except for BASH, which is always set by the calling BASH).
66081      if test "xICECC_CMD" != xBASH; then
66082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66083$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66084      fi
66085      # Try to locate tool using the code snippet
66086      for ac_prog in icecc
66087do
66088  # Extract the first word of "$ac_prog", so it can be a program name with args.
66089set dummy $ac_prog; ac_word=$2
66090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66091$as_echo_n "checking for $ac_word... " >&6; }
66092if ${ac_cv_path_ICECC_CMD+:} false; then :
66093  $as_echo_n "(cached) " >&6
66094else
66095  case $ICECC_CMD in
66096  [\\/]* | ?:[\\/]*)
66097  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66098  ;;
66099  *)
66100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66101for as_dir in $PATH
66102do
66103  IFS=$as_save_IFS
66104  test -z "$as_dir" && as_dir=.
66105    for ac_exec_ext in '' $ac_executable_extensions; do
66106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66107    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66109    break 2
66110  fi
66111done
66112  done
66113IFS=$as_save_IFS
66114
66115  ;;
66116esac
66117fi
66118ICECC_CMD=$ac_cv_path_ICECC_CMD
66119if test -n "$ICECC_CMD"; then
66120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66121$as_echo "$ICECC_CMD" >&6; }
66122else
66123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66124$as_echo "no" >&6; }
66125fi
66126
66127
66128  test -n "$ICECC_CMD" && break
66129done
66130
66131    else
66132      # If it succeeded, then it was overridden by the user. We will use it
66133      # for the tool.
66134
66135      # First remove it from the list of overridden variables, so we can test
66136      # for unknown variables in the end.
66137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66138
66139      # Check if we try to supply an empty value
66140      if test "x$ICECC_CMD" = x; then
66141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66142$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66144$as_echo_n "checking for ICECC_CMD... " >&6; }
66145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66146$as_echo "disabled" >&6; }
66147      else
66148        # Check if the provided tool contains a complete path.
66149        tool_specified="$ICECC_CMD"
66150        tool_basename="${tool_specified##*/}"
66151        if test "x$tool_basename" = "x$tool_specified"; then
66152          # A command without a complete path is provided, search $PATH.
66153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66154$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66155          # Extract the first word of "$tool_basename", so it can be a program name with args.
66156set dummy $tool_basename; ac_word=$2
66157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66158$as_echo_n "checking for $ac_word... " >&6; }
66159if ${ac_cv_path_ICECC_CMD+:} false; then :
66160  $as_echo_n "(cached) " >&6
66161else
66162  case $ICECC_CMD in
66163  [\\/]* | ?:[\\/]*)
66164  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66165  ;;
66166  *)
66167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66168for as_dir in $PATH
66169do
66170  IFS=$as_save_IFS
66171  test -z "$as_dir" && as_dir=.
66172    for ac_exec_ext in '' $ac_executable_extensions; do
66173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66174    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66176    break 2
66177  fi
66178done
66179  done
66180IFS=$as_save_IFS
66181
66182  ;;
66183esac
66184fi
66185ICECC_CMD=$ac_cv_path_ICECC_CMD
66186if test -n "$ICECC_CMD"; then
66187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66188$as_echo "$ICECC_CMD" >&6; }
66189else
66190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66191$as_echo "no" >&6; }
66192fi
66193
66194
66195          if test "x$ICECC_CMD" = x; then
66196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66197          fi
66198        else
66199          # Otherwise we believe it is a complete path. Use it as it is.
66200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66201$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66203$as_echo_n "checking for ICECC_CMD... " >&6; }
66204          if test ! -x "$tool_specified"; then
66205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66206$as_echo "not found" >&6; }
66207            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66208          fi
66209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66210$as_echo "$tool_specified" >&6; }
66211        fi
66212      fi
66213    fi
66214
66215  fi
66216
66217
66218
66219  if test "x$ICECC_CMD" = x; then
66220    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66221  fi
66222
66223
66224    old_path="$PATH"
66225
66226    # Look for icecc-create-env in some known places
66227    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66228
66229
66230
66231  # Publish this variable in the help.
66232
66233
66234  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66235    # The variable is not set by user, try to locate tool using the code snippet
66236    for ac_prog in icecc-create-env
66237do
66238  # Extract the first word of "$ac_prog", so it can be a program name with args.
66239set dummy $ac_prog; ac_word=$2
66240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66241$as_echo_n "checking for $ac_word... " >&6; }
66242if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66243  $as_echo_n "(cached) " >&6
66244else
66245  case $ICECC_CREATE_ENV in
66246  [\\/]* | ?:[\\/]*)
66247  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66248  ;;
66249  *)
66250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66251for as_dir in $PATH
66252do
66253  IFS=$as_save_IFS
66254  test -z "$as_dir" && as_dir=.
66255    for ac_exec_ext in '' $ac_executable_extensions; do
66256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66257    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66259    break 2
66260  fi
66261done
66262  done
66263IFS=$as_save_IFS
66264
66265  ;;
66266esac
66267fi
66268ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66269if test -n "$ICECC_CREATE_ENV"; then
66270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66271$as_echo "$ICECC_CREATE_ENV" >&6; }
66272else
66273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66274$as_echo "no" >&6; }
66275fi
66276
66277
66278  test -n "$ICECC_CREATE_ENV" && break
66279done
66280
66281  else
66282    # The variable is set, but is it from the command line or the environment?
66283
66284    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66287      # If it failed, the variable was not from the command line. Ignore it,
66288      # but warn the user (except for BASH, which is always set by the calling BASH).
66289      if test "xICECC_CREATE_ENV" != xBASH; then
66290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66291$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66292      fi
66293      # Try to locate tool using the code snippet
66294      for ac_prog in icecc-create-env
66295do
66296  # Extract the first word of "$ac_prog", so it can be a program name with args.
66297set dummy $ac_prog; ac_word=$2
66298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66299$as_echo_n "checking for $ac_word... " >&6; }
66300if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66301  $as_echo_n "(cached) " >&6
66302else
66303  case $ICECC_CREATE_ENV in
66304  [\\/]* | ?:[\\/]*)
66305  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66306  ;;
66307  *)
66308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66309for as_dir in $PATH
66310do
66311  IFS=$as_save_IFS
66312  test -z "$as_dir" && as_dir=.
66313    for ac_exec_ext in '' $ac_executable_extensions; do
66314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66315    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66317    break 2
66318  fi
66319done
66320  done
66321IFS=$as_save_IFS
66322
66323  ;;
66324esac
66325fi
66326ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66327if test -n "$ICECC_CREATE_ENV"; then
66328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66329$as_echo "$ICECC_CREATE_ENV" >&6; }
66330else
66331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66332$as_echo "no" >&6; }
66333fi
66334
66335
66336  test -n "$ICECC_CREATE_ENV" && break
66337done
66338
66339    else
66340      # If it succeeded, then it was overridden by the user. We will use it
66341      # for the tool.
66342
66343      # First remove it from the list of overridden variables, so we can test
66344      # for unknown variables in the end.
66345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66346
66347      # Check if we try to supply an empty value
66348      if test "x$ICECC_CREATE_ENV" = x; then
66349        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66350$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66352$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66354$as_echo "disabled" >&6; }
66355      else
66356        # Check if the provided tool contains a complete path.
66357        tool_specified="$ICECC_CREATE_ENV"
66358        tool_basename="${tool_specified##*/}"
66359        if test "x$tool_basename" = "x$tool_specified"; then
66360          # A command without a complete path is provided, search $PATH.
66361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66362$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66363          # Extract the first word of "$tool_basename", so it can be a program name with args.
66364set dummy $tool_basename; ac_word=$2
66365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66366$as_echo_n "checking for $ac_word... " >&6; }
66367if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66368  $as_echo_n "(cached) " >&6
66369else
66370  case $ICECC_CREATE_ENV in
66371  [\\/]* | ?:[\\/]*)
66372  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66373  ;;
66374  *)
66375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66376for as_dir in $PATH
66377do
66378  IFS=$as_save_IFS
66379  test -z "$as_dir" && as_dir=.
66380    for ac_exec_ext in '' $ac_executable_extensions; do
66381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66382    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66384    break 2
66385  fi
66386done
66387  done
66388IFS=$as_save_IFS
66389
66390  ;;
66391esac
66392fi
66393ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66394if test -n "$ICECC_CREATE_ENV"; then
66395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66396$as_echo "$ICECC_CREATE_ENV" >&6; }
66397else
66398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66399$as_echo "no" >&6; }
66400fi
66401
66402
66403          if test "x$ICECC_CREATE_ENV" = x; then
66404            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66405          fi
66406        else
66407          # Otherwise we believe it is a complete path. Use it as it is.
66408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66409$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66410          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66411$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66412          if test ! -x "$tool_specified"; then
66413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66414$as_echo "not found" >&6; }
66415            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66416          fi
66417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66418$as_echo "$tool_specified" >&6; }
66419        fi
66420      fi
66421    fi
66422
66423  fi
66424
66425
66426
66427  if test "x$ICECC_CREATE_ENV" = x; then
66428    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66429  fi
66430
66431
66432    # Use icecc-create-env to create a minimal compilation environment that can
66433    # be sent to the other hosts in the icecream cluster.
66434    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66435    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66436    # Older versions of icecc does not have the --gcc parameter
66437    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66438      icecc_gcc_arg="--gcc"
66439    fi
66440    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66441
66442  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66443      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66444          ${icecc_create_env_log} 2>&1 )
66445  if test "$?" != "0"; then
66446    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66447$as_echo "$as_me: icecc-create-env output:" >&6;}
66448    cat \
66449          ${icecc_create_env_log}
66450    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66451  fi
66452
66453    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66454      # For clang, the icecc compilerwrapper is needed. It usually resides next
66455      # to icecc-create-env.
66456
66457
66458
66459  # Publish this variable in the help.
66460
66461
66462  if [ -z "${ICECC_WRAPPER+x}" ]; then
66463    # The variable is not set by user, try to locate tool using the code snippet
66464    for ac_prog in compilerwrapper
66465do
66466  # Extract the first word of "$ac_prog", so it can be a program name with args.
66467set dummy $ac_prog; ac_word=$2
66468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66469$as_echo_n "checking for $ac_word... " >&6; }
66470if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66471  $as_echo_n "(cached) " >&6
66472else
66473  case $ICECC_WRAPPER in
66474  [\\/]* | ?:[\\/]*)
66475  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66476  ;;
66477  *)
66478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66479for as_dir in $PATH
66480do
66481  IFS=$as_save_IFS
66482  test -z "$as_dir" && as_dir=.
66483    for ac_exec_ext in '' $ac_executable_extensions; do
66484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66485    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66487    break 2
66488  fi
66489done
66490  done
66491IFS=$as_save_IFS
66492
66493  ;;
66494esac
66495fi
66496ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66497if test -n "$ICECC_WRAPPER"; then
66498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66499$as_echo "$ICECC_WRAPPER" >&6; }
66500else
66501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66502$as_echo "no" >&6; }
66503fi
66504
66505
66506  test -n "$ICECC_WRAPPER" && break
66507done
66508
66509  else
66510    # The variable is set, but is it from the command line or the environment?
66511
66512    # Try to remove the string !ICECC_WRAPPER! from our list.
66513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66515      # If it failed, the variable was not from the command line. Ignore it,
66516      # but warn the user (except for BASH, which is always set by the calling BASH).
66517      if test "xICECC_WRAPPER" != xBASH; then
66518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66519$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66520      fi
66521      # Try to locate tool using the code snippet
66522      for ac_prog in compilerwrapper
66523do
66524  # Extract the first word of "$ac_prog", so it can be a program name with args.
66525set dummy $ac_prog; ac_word=$2
66526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66527$as_echo_n "checking for $ac_word... " >&6; }
66528if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66529  $as_echo_n "(cached) " >&6
66530else
66531  case $ICECC_WRAPPER in
66532  [\\/]* | ?:[\\/]*)
66533  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66534  ;;
66535  *)
66536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66537for as_dir in $PATH
66538do
66539  IFS=$as_save_IFS
66540  test -z "$as_dir" && as_dir=.
66541    for ac_exec_ext in '' $ac_executable_extensions; do
66542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66543    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66545    break 2
66546  fi
66547done
66548  done
66549IFS=$as_save_IFS
66550
66551  ;;
66552esac
66553fi
66554ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66555if test -n "$ICECC_WRAPPER"; then
66556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66557$as_echo "$ICECC_WRAPPER" >&6; }
66558else
66559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66560$as_echo "no" >&6; }
66561fi
66562
66563
66564  test -n "$ICECC_WRAPPER" && break
66565done
66566
66567    else
66568      # If it succeeded, then it was overridden by the user. We will use it
66569      # for the tool.
66570
66571      # First remove it from the list of overridden variables, so we can test
66572      # for unknown variables in the end.
66573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66574
66575      # Check if we try to supply an empty value
66576      if test "x$ICECC_WRAPPER" = x; then
66577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66578$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66580$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66582$as_echo "disabled" >&6; }
66583      else
66584        # Check if the provided tool contains a complete path.
66585        tool_specified="$ICECC_WRAPPER"
66586        tool_basename="${tool_specified##*/}"
66587        if test "x$tool_basename" = "x$tool_specified"; then
66588          # A command without a complete path is provided, search $PATH.
66589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66590$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66591          # Extract the first word of "$tool_basename", so it can be a program name with args.
66592set dummy $tool_basename; ac_word=$2
66593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66594$as_echo_n "checking for $ac_word... " >&6; }
66595if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66596  $as_echo_n "(cached) " >&6
66597else
66598  case $ICECC_WRAPPER in
66599  [\\/]* | ?:[\\/]*)
66600  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66601  ;;
66602  *)
66603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66604for as_dir in $PATH
66605do
66606  IFS=$as_save_IFS
66607  test -z "$as_dir" && as_dir=.
66608    for ac_exec_ext in '' $ac_executable_extensions; do
66609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66610    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66612    break 2
66613  fi
66614done
66615  done
66616IFS=$as_save_IFS
66617
66618  ;;
66619esac
66620fi
66621ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66622if test -n "$ICECC_WRAPPER"; then
66623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66624$as_echo "$ICECC_WRAPPER" >&6; }
66625else
66626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66627$as_echo "no" >&6; }
66628fi
66629
66630
66631          if test "x$ICECC_WRAPPER" = x; then
66632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66633          fi
66634        else
66635          # Otherwise we believe it is a complete path. Use it as it is.
66636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66637$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66639$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66640          if test ! -x "$tool_specified"; then
66641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66642$as_echo "not found" >&6; }
66643            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66644          fi
66645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66646$as_echo "$tool_specified" >&6; }
66647        fi
66648      fi
66649    fi
66650
66651  fi
66652
66653
66654
66655  if test "x$ICECC_WRAPPER" = x; then
66656    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66657  fi
66658
66659
66660
66661  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66662      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66663  if test "$?" != "0"; then
66664    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66665$as_echo "$as_me: icecc-create-env output:" >&6;}
66666    cat ${icecc_create_env_log}
66667    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66668  fi
66669
66670    else
66671      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66672    fi
66673    PATH="$old_path"
66674    # The bundle with the compiler gets a name based on checksums. Parse log file
66675    # to find it.
66676    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66677    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66678    if test ! -f ${ICECC_ENV_BUNDLE}; then
66679      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66680    fi
66681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66682$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66684$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66685    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66686
66687    if test "x${COMPILE_TYPE}" = "xcross"; then
66688      # If cross compiling, create a separate env package for the build compiler
66689      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66690      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66691      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66692
66693  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66694      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66695            ${icecc_create_env_log_build} 2>&1 )
66696  if test "$?" != "0"; then
66697    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66698$as_echo "$as_me: icecc-create-env output:" >&6;}
66699    cat \
66700            ${icecc_create_env_log_build}
66701    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66702  fi
66703
66704      elif test "x${BUILD_CC##*/}" = "xclang"; then
66705
66706  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66707      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66708  if test "$?" != "0"; then
66709    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66710$as_echo "$as_me: icecc-create-env output:" >&6;}
66711    cat ${icecc_create_env_log_build}
66712    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66713  fi
66714
66715      else
66716        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66717      fi
66718      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66719      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66720      if test ! -f ${ICECC_ENV_BUNDLE}; then
66721        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66722      fi
66723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66724$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66726$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66727      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66728          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66729    else
66730      BUILD_ICECC="${ICECC}"
66731    fi
66732
66733
66734  fi
66735
66736
66737# Can the C/C++ compiler use precompiled headers?
66738
66739
66740  ###############################################################################
66741  #
66742  # Can the C/C++ compiler use precompiled headers?
66743  #
66744  # Check whether --enable-precompiled-headers was given.
66745if test "${enable_precompiled_headers+set}" = set; then :
66746  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66747else
66748  ENABLE_PRECOMPH=yes
66749fi
66750
66751
66752  USE_PRECOMPILED_HEADER=true
66753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66754$as_echo_n "checking If precompiled header is enabled... " >&6; }
66755  if test "x$ENABLE_PRECOMPH" = xno; then
66756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66757$as_echo "no, forced" >&6; }
66758    USE_PRECOMPILED_HEADER=false
66759  elif test "x$ICECC" != "x"; then
66760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66761$as_echo "no, does not work effectively with icecc" >&6; }
66762    USE_PRECOMPILED_HEADER=false
66763  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66765$as_echo "no, does not work with Solaris Studio" >&6; }
66766    USE_PRECOMPILED_HEADER=false
66767  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66769$as_echo "no, does not work with xlc" >&6; }
66770    USE_PRECOMPILED_HEADER=false
66771  else
66772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66773$as_echo "yes" >&6; }
66774  fi
66775
66776  if test "x$ENABLE_PRECOMPH" = xyes; then
66777    # Check that the compiler actually supports precomp headers.
66778    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66780$as_echo_n "checking that precompiled headers work... " >&6; }
66781      echo "int alfa();" > conftest.h
66782      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66783      if test ! -f conftest.hpp.gch; then
66784        USE_PRECOMPILED_HEADER=false
66785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66786$as_echo "no" >&6; }
66787      else
66788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66789$as_echo "yes" >&6; }
66790      fi
66791      $RM conftest.h conftest.hpp.gch
66792    fi
66793  fi
66794
66795
66796
66797
66798# Setup use of ccache, if available
66799
66800  # Check whether --enable-ccache was given.
66801if test "${enable_ccache+set}" = set; then :
66802  enableval=$enable_ccache;
66803fi
66804
66805
66806  CCACHE_STATUS=
66807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66808$as_echo_n "checking is ccache enabled... " >&6; }
66809  if test "x$enable_ccache" = xyes; then
66810    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66812$as_echo "yes" >&6; }
66813      OLD_PATH="$PATH"
66814      if test "x$TOOLCHAIN_PATH" != x; then
66815        PATH=$TOOLCHAIN_PATH:$PATH
66816      fi
66817
66818
66819
66820  # Publish this variable in the help.
66821
66822
66823  if [ -z "${CCACHE+x}" ]; then
66824    # The variable is not set by user, try to locate tool using the code snippet
66825    for ac_prog in ccache
66826do
66827  # Extract the first word of "$ac_prog", so it can be a program name with args.
66828set dummy $ac_prog; ac_word=$2
66829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66830$as_echo_n "checking for $ac_word... " >&6; }
66831if ${ac_cv_path_CCACHE+:} false; then :
66832  $as_echo_n "(cached) " >&6
66833else
66834  case $CCACHE in
66835  [\\/]* | ?:[\\/]*)
66836  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66837  ;;
66838  *)
66839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66840for as_dir in $PATH
66841do
66842  IFS=$as_save_IFS
66843  test -z "$as_dir" && as_dir=.
66844    for ac_exec_ext in '' $ac_executable_extensions; do
66845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66846    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66848    break 2
66849  fi
66850done
66851  done
66852IFS=$as_save_IFS
66853
66854  ;;
66855esac
66856fi
66857CCACHE=$ac_cv_path_CCACHE
66858if test -n "$CCACHE"; then
66859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66860$as_echo "$CCACHE" >&6; }
66861else
66862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66863$as_echo "no" >&6; }
66864fi
66865
66866
66867  test -n "$CCACHE" && break
66868done
66869
66870  else
66871    # The variable is set, but is it from the command line or the environment?
66872
66873    # Try to remove the string !CCACHE! from our list.
66874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66876      # If it failed, the variable was not from the command line. Ignore it,
66877      # but warn the user (except for BASH, which is always set by the calling BASH).
66878      if test "xCCACHE" != xBASH; then
66879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66880$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66881      fi
66882      # Try to locate tool using the code snippet
66883      for ac_prog in ccache
66884do
66885  # Extract the first word of "$ac_prog", so it can be a program name with args.
66886set dummy $ac_prog; ac_word=$2
66887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66888$as_echo_n "checking for $ac_word... " >&6; }
66889if ${ac_cv_path_CCACHE+:} false; then :
66890  $as_echo_n "(cached) " >&6
66891else
66892  case $CCACHE in
66893  [\\/]* | ?:[\\/]*)
66894  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66895  ;;
66896  *)
66897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66898for as_dir in $PATH
66899do
66900  IFS=$as_save_IFS
66901  test -z "$as_dir" && as_dir=.
66902    for ac_exec_ext in '' $ac_executable_extensions; do
66903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66904    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66906    break 2
66907  fi
66908done
66909  done
66910IFS=$as_save_IFS
66911
66912  ;;
66913esac
66914fi
66915CCACHE=$ac_cv_path_CCACHE
66916if test -n "$CCACHE"; then
66917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66918$as_echo "$CCACHE" >&6; }
66919else
66920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66921$as_echo "no" >&6; }
66922fi
66923
66924
66925  test -n "$CCACHE" && break
66926done
66927
66928    else
66929      # If it succeeded, then it was overridden by the user. We will use it
66930      # for the tool.
66931
66932      # First remove it from the list of overridden variables, so we can test
66933      # for unknown variables in the end.
66934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66935
66936      # Check if we try to supply an empty value
66937      if test "x$CCACHE" = x; then
66938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66939$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66941$as_echo_n "checking for CCACHE... " >&6; }
66942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66943$as_echo "disabled" >&6; }
66944      else
66945        # Check if the provided tool contains a complete path.
66946        tool_specified="$CCACHE"
66947        tool_basename="${tool_specified##*/}"
66948        if test "x$tool_basename" = "x$tool_specified"; then
66949          # A command without a complete path is provided, search $PATH.
66950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66951$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66952          # Extract the first word of "$tool_basename", so it can be a program name with args.
66953set dummy $tool_basename; ac_word=$2
66954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66955$as_echo_n "checking for $ac_word... " >&6; }
66956if ${ac_cv_path_CCACHE+:} false; then :
66957  $as_echo_n "(cached) " >&6
66958else
66959  case $CCACHE in
66960  [\\/]* | ?:[\\/]*)
66961  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66962  ;;
66963  *)
66964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66965for as_dir in $PATH
66966do
66967  IFS=$as_save_IFS
66968  test -z "$as_dir" && as_dir=.
66969    for ac_exec_ext in '' $ac_executable_extensions; do
66970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66971    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66973    break 2
66974  fi
66975done
66976  done
66977IFS=$as_save_IFS
66978
66979  ;;
66980esac
66981fi
66982CCACHE=$ac_cv_path_CCACHE
66983if test -n "$CCACHE"; then
66984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66985$as_echo "$CCACHE" >&6; }
66986else
66987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66988$as_echo "no" >&6; }
66989fi
66990
66991
66992          if test "x$CCACHE" = x; then
66993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66994          fi
66995        else
66996          # Otherwise we believe it is a complete path. Use it as it is.
66997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66998$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67000$as_echo_n "checking for CCACHE... " >&6; }
67001          if test ! -x "$tool_specified"; then
67002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67003$as_echo "not found" >&6; }
67004            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67005          fi
67006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67007$as_echo "$tool_specified" >&6; }
67008        fi
67009      fi
67010    fi
67011
67012  fi
67013
67014
67015
67016  if test "x$CCACHE" = x; then
67017    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67018  fi
67019
67020
67021      PATH="$OLD_PATH"
67022      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67023      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67024    else
67025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67026$as_echo "no" >&6; }
67027      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67028$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67029    fi
67030  elif test "x$enable_ccache" = xno; then
67031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67032$as_echo "no, explicitly disabled" >&6; }
67033    CCACHE_STATUS="Disabled"
67034  elif test "x$enable_ccache" = x; then
67035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67036$as_echo "no" >&6; }
67037  else
67038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67039$as_echo "unknown" >&6; }
67040    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67041  fi
67042
67043
67044
67045# Check whether --with-ccache-dir was given.
67046if test "${with_ccache_dir+set}" = set; then :
67047  withval=$with_ccache_dir;
67048fi
67049
67050
67051  if test "x$with_ccache_dir" != x; then
67052    # When using a non home ccache directory, assume the use is to share ccache files
67053    # with other users. Thus change the umask.
67054    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67055    if test "x$CCACHE" = x; then
67056      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67057$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67058    fi
67059  fi
67060
67061  if test "x$CCACHE" != x; then
67062
67063  if test "x$CCACHE" != x; then
67064    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67065      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67066          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67067      if test "x$HAS_BAD_CCACHE" != "x"; then
67068        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67069      fi
67070    fi
67071    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67072      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67073          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67074      if test "x$HAS_BAD_CCACHE" != "x"; then
67075        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67076      fi
67077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67078$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67079      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67080      PUSHED_FLAGS="$CXXFLAGS"
67081      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67082      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67083/* end confdefs.h.  */
67084
67085int
67086main ()
67087{
67088
67089  ;
67090  return 0;
67091}
67092_ACEOF
67093if ac_fn_cxx_try_compile "$LINENO"; then :
67094  CC_KNOWS_CCACHE_TRICK=yes
67095else
67096  CC_KNOWS_CCACHE_TRICK=no
67097fi
67098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67099      CXXFLAGS="$PUSHED_FLAGS"
67100      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67102$as_echo "yes" >&6; }
67103        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67104
67105        CCACHE_SLOPPINESS=pch_defines,time_macros
67106      else
67107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67108$as_echo "no" >&6; }
67109        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67110      fi
67111    fi
67112
67113    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67114        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67115
67116    if test "x$SET_CCACHE_DIR" != x; then
67117      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67118      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67119    fi
67120  fi
67121
67122  fi
67123
67124
67125###############################################################################
67126#
67127# And now the finish...
67128#
67129###############################################################################
67130
67131# Check for some common pitfalls
67132
67133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67134    file_to_test="$SRC_ROOT/LICENSE"
67135    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67136      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
67137    fi
67138  fi
67139
67140
67141  # Did user specify any unknown variables?
67142
67143  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67144    # Replace the separating ! with spaces before presenting for end user.
67145    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67146    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67147$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67148  fi
67149
67150
67151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67152$as_echo_n "checking if build directory is on local disk... " >&6; }
67153
67154  # df -l lists only local disks; if the given directory is not found then
67155  # a non-zero exit code is given
67156  if test "x$DF" = x; then
67157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67158      # msys does not have df; use Windows "net use" instead.
67159      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67160      if test "x$IS_NETWORK_DISK" = x; then
67161        OUTPUT_DIR_IS_LOCAL="yes"
67162      else
67163        OUTPUT_DIR_IS_LOCAL="no"
67164      fi
67165    else
67166      # No df here, say it's local
67167      OUTPUT_DIR_IS_LOCAL="yes"
67168    fi
67169  else
67170    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67171      OUTPUT_DIR_IS_LOCAL="yes"
67172    else
67173      OUTPUT_DIR_IS_LOCAL="no"
67174    fi
67175  fi
67176
67177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67178$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67179
67180
67181
67182  # Check if the user has any old-style ALT_ variables set.
67183  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67184
67185  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67186  # Since we can't properly handle the dependencies for this, warn the user about the situation
67187  if test -e $OUTPUT_ROOT/spec.gmk; then
67188    IS_RECONFIGURE=yes
67189  else
67190    IS_RECONFIGURE=no
67191  fi
67192
67193
67194# At the end, call the custom hook. (Dummy macro if no custom sources available)
67195
67196
67197# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67198
67199  # Keep feature lists sorted and free of duplicates
67200  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67201  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67202  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67203  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67204  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67205  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67206  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67207
67208  # Validate features
67209  for variant in $JVM_VARIANTS; do
67210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67211$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67212    features_var_name=JVM_FEATURES_$variant
67213    JVM_FEATURES_TO_TEST=${!features_var_name}
67214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67215$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67216    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67217    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67218    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67219    if test "x$INVALID_FEATURES" != x; then
67220      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67221    fi
67222  done
67223
67224
67225# We're messing a bit with internal autoconf variables to put the config.status
67226# in the output directory instead of the current directory.
67227CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67228
67229# Create the actual output files. Now the main work of configure is done.
67230cat >confcache <<\_ACEOF
67231# This file is a shell script that caches the results of configure
67232# tests run on this system so they can be shared between configure
67233# scripts and configure runs, see configure's option --config-cache.
67234# It is not useful on other systems.  If it contains results you don't
67235# want to keep, you may remove or edit it.
67236#
67237# config.status only pays attention to the cache file if you give it
67238# the --recheck option to rerun configure.
67239#
67240# `ac_cv_env_foo' variables (set or unset) will be overridden when
67241# loading this file, other *unset* `ac_cv_foo' will be assigned the
67242# following values.
67243
67244_ACEOF
67245
67246# The following way of writing the cache mishandles newlines in values,
67247# but we know of no workaround that is simple, portable, and efficient.
67248# So, we kill variables containing newlines.
67249# Ultrix sh set writes to stderr and can't be redirected directly,
67250# and sets the high bit in the cache file unless we assign to the vars.
67251(
67252  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67253    eval ac_val=\$$ac_var
67254    case $ac_val in #(
67255    *${as_nl}*)
67256      case $ac_var in #(
67257      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67258$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67259      esac
67260      case $ac_var in #(
67261      _ | IFS | as_nl) ;; #(
67262      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67263      *) { eval $ac_var=; unset $ac_var;} ;;
67264      esac ;;
67265    esac
67266  done
67267
67268  (set) 2>&1 |
67269    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67270    *${as_nl}ac_space=\ *)
67271      # `set' does not quote correctly, so add quotes: double-quote
67272      # substitution turns \\\\ into \\, and sed turns \\ into \.
67273      sed -n \
67274	"s/'/'\\\\''/g;
67275	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67276      ;; #(
67277    *)
67278      # `set' quotes correctly as required by POSIX, so do not add quotes.
67279      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67280      ;;
67281    esac |
67282    sort
67283) |
67284  sed '
67285     /^ac_cv_env_/b end
67286     t clear
67287     :clear
67288     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67289     t end
67290     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67291     :end' >>confcache
67292if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67293  if test -w "$cache_file"; then
67294    if test "x$cache_file" != "x/dev/null"; then
67295      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67296$as_echo "$as_me: updating cache $cache_file" >&6;}
67297      if test ! -f "$cache_file" || test -h "$cache_file"; then
67298	cat confcache >"$cache_file"
67299      else
67300        case $cache_file in #(
67301        */* | ?:*)
67302	  mv -f confcache "$cache_file"$$ &&
67303	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67304        *)
67305	  mv -f confcache "$cache_file" ;;
67306	esac
67307      fi
67308    fi
67309  else
67310    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67311$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67312  fi
67313fi
67314rm -f confcache
67315
67316test "x$prefix" = xNONE && prefix=$ac_default_prefix
67317# Let make expand exec_prefix.
67318test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67319
67320# Transform confdefs.h into DEFS.
67321# Protect against shell expansion while executing Makefile rules.
67322# Protect against Makefile macro expansion.
67323#
67324# If the first sed substitution is executed (which looks for macros that
67325# take arguments), then branch to the quote section.  Otherwise,
67326# look for a macro that doesn't take arguments.
67327ac_script='
67328:mline
67329/\\$/{
67330 N
67331 s,\\\n,,
67332 b mline
67333}
67334t clear
67335:clear
67336s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67337t quote
67338s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67339t quote
67340b any
67341:quote
67342s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67343s/\[/\\&/g
67344s/\]/\\&/g
67345s/\$/$$/g
67346H
67347:any
67348${
67349	g
67350	s/^\n//
67351	s/\n/ /g
67352	p
67353}
67354'
67355DEFS=`sed -n "$ac_script" confdefs.h`
67356
67357
67358ac_libobjs=
67359ac_ltlibobjs=
67360U=
67361for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67362  # 1. Remove the extension, and $U if already installed.
67363  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67364  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67365  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67366  #    will be set to the directory where LIBOBJS objects are built.
67367  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67368  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67369done
67370LIBOBJS=$ac_libobjs
67371
67372LTLIBOBJS=$ac_ltlibobjs
67373
67374
67375
67376: "${CONFIG_STATUS=./config.status}"
67377ac_write_fail=0
67378ac_clean_files_save=$ac_clean_files
67379ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67380{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67381$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67382as_write_fail=0
67383cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67384#! $SHELL
67385# Generated by $as_me.
67386# Run this file to recreate the current configuration.
67387# Compiler output produced by configure, useful for debugging
67388# configure, is in config.log if it exists.
67389
67390debug=false
67391ac_cs_recheck=false
67392ac_cs_silent=false
67393
67394SHELL=\${CONFIG_SHELL-$SHELL}
67395export SHELL
67396_ASEOF
67397cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67398## -------------------- ##
67399## M4sh Initialization. ##
67400## -------------------- ##
67401
67402# Be more Bourne compatible
67403DUALCASE=1; export DUALCASE # for MKS sh
67404if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67405  emulate sh
67406  NULLCMD=:
67407  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67408  # is contrary to our usage.  Disable this feature.
67409  alias -g '${1+"$@"}'='"$@"'
67410  setopt NO_GLOB_SUBST
67411else
67412  case `(set -o) 2>/dev/null` in #(
67413  *posix*) :
67414    set -o posix ;; #(
67415  *) :
67416     ;;
67417esac
67418fi
67419
67420
67421as_nl='
67422'
67423export as_nl
67424# Printing a long string crashes Solaris 7 /usr/bin/printf.
67425as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67426as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67427as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67428# Prefer a ksh shell builtin over an external printf program on Solaris,
67429# but without wasting forks for bash or zsh.
67430if test -z "$BASH_VERSION$ZSH_VERSION" \
67431    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67432  as_echo='print -r --'
67433  as_echo_n='print -rn --'
67434elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67435  as_echo='printf %s\n'
67436  as_echo_n='printf %s'
67437else
67438  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67439    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67440    as_echo_n='/usr/ucb/echo -n'
67441  else
67442    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67443    as_echo_n_body='eval
67444      arg=$1;
67445      case $arg in #(
67446      *"$as_nl"*)
67447	expr "X$arg" : "X\\(.*\\)$as_nl";
67448	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67449      esac;
67450      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67451    '
67452    export as_echo_n_body
67453    as_echo_n='sh -c $as_echo_n_body as_echo'
67454  fi
67455  export as_echo_body
67456  as_echo='sh -c $as_echo_body as_echo'
67457fi
67458
67459# The user is always right.
67460if test "${PATH_SEPARATOR+set}" != set; then
67461  PATH_SEPARATOR=:
67462  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67463    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67464      PATH_SEPARATOR=';'
67465  }
67466fi
67467
67468
67469# IFS
67470# We need space, tab and new line, in precisely that order.  Quoting is
67471# there to prevent editors from complaining about space-tab.
67472# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67473# splitting by setting IFS to empty value.)
67474IFS=" ""	$as_nl"
67475
67476# Find who we are.  Look in the path if we contain no directory separator.
67477as_myself=
67478case $0 in #((
67479  *[\\/]* ) as_myself=$0 ;;
67480  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67481for as_dir in $PATH
67482do
67483  IFS=$as_save_IFS
67484  test -z "$as_dir" && as_dir=.
67485    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67486  done
67487IFS=$as_save_IFS
67488
67489     ;;
67490esac
67491# We did not find ourselves, most probably we were run as `sh COMMAND'
67492# in which case we are not to be found in the path.
67493if test "x$as_myself" = x; then
67494  as_myself=$0
67495fi
67496if test ! -f "$as_myself"; then
67497  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67498  exit 1
67499fi
67500
67501# Unset variables that we do not need and which cause bugs (e.g. in
67502# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67503# suppresses any "Segmentation fault" message there.  '((' could
67504# trigger a bug in pdksh 5.2.14.
67505for as_var in BASH_ENV ENV MAIL MAILPATH
67506do eval test x\${$as_var+set} = xset \
67507  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67508done
67509PS1='$ '
67510PS2='> '
67511PS4='+ '
67512
67513# NLS nuisances.
67514LC_ALL=C
67515export LC_ALL
67516LANGUAGE=C
67517export LANGUAGE
67518
67519# CDPATH.
67520(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67521
67522
67523# as_fn_error STATUS ERROR [LINENO LOG_FD]
67524# ----------------------------------------
67525# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67526# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67527# script with STATUS, using 1 if that was 0.
67528as_fn_error ()
67529{
67530  as_status=$1; test $as_status -eq 0 && as_status=1
67531  if test "$4"; then
67532    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67533    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67534  fi
67535  $as_echo "$as_me: error: $2" >&2
67536  as_fn_exit $as_status
67537} # as_fn_error
67538
67539
67540# as_fn_set_status STATUS
67541# -----------------------
67542# Set $? to STATUS, without forking.
67543as_fn_set_status ()
67544{
67545  return $1
67546} # as_fn_set_status
67547
67548# as_fn_exit STATUS
67549# -----------------
67550# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67551as_fn_exit ()
67552{
67553  set +e
67554  as_fn_set_status $1
67555  exit $1
67556} # as_fn_exit
67557
67558# as_fn_unset VAR
67559# ---------------
67560# Portably unset VAR.
67561as_fn_unset ()
67562{
67563  { eval $1=; unset $1;}
67564}
67565as_unset=as_fn_unset
67566# as_fn_append VAR VALUE
67567# ----------------------
67568# Append the text in VALUE to the end of the definition contained in VAR. Take
67569# advantage of any shell optimizations that allow amortized linear growth over
67570# repeated appends, instead of the typical quadratic growth present in naive
67571# implementations.
67572if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67573  eval 'as_fn_append ()
67574  {
67575    eval $1+=\$2
67576  }'
67577else
67578  as_fn_append ()
67579  {
67580    eval $1=\$$1\$2
67581  }
67582fi # as_fn_append
67583
67584# as_fn_arith ARG...
67585# ------------------
67586# Perform arithmetic evaluation on the ARGs, and store the result in the
67587# global $as_val. Take advantage of shells that can avoid forks. The arguments
67588# must be portable across $(()) and expr.
67589if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67590  eval 'as_fn_arith ()
67591  {
67592    as_val=$(( $* ))
67593  }'
67594else
67595  as_fn_arith ()
67596  {
67597    as_val=`expr "$@" || test $? -eq 1`
67598  }
67599fi # as_fn_arith
67600
67601
67602if expr a : '\(a\)' >/dev/null 2>&1 &&
67603   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67604  as_expr=expr
67605else
67606  as_expr=false
67607fi
67608
67609if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67610  as_basename=basename
67611else
67612  as_basename=false
67613fi
67614
67615if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67616  as_dirname=dirname
67617else
67618  as_dirname=false
67619fi
67620
67621as_me=`$as_basename -- "$0" ||
67622$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67623	 X"$0" : 'X\(//\)$' \| \
67624	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67625$as_echo X/"$0" |
67626    sed '/^.*\/\([^/][^/]*\)\/*$/{
67627	    s//\1/
67628	    q
67629	  }
67630	  /^X\/\(\/\/\)$/{
67631	    s//\1/
67632	    q
67633	  }
67634	  /^X\/\(\/\).*/{
67635	    s//\1/
67636	    q
67637	  }
67638	  s/.*/./; q'`
67639
67640# Avoid depending upon Character Ranges.
67641as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67642as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67643as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67644as_cr_digits='0123456789'
67645as_cr_alnum=$as_cr_Letters$as_cr_digits
67646
67647ECHO_C= ECHO_N= ECHO_T=
67648case `echo -n x` in #(((((
67649-n*)
67650  case `echo 'xy\c'` in
67651  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67652  xy)  ECHO_C='\c';;
67653  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67654       ECHO_T='	';;
67655  esac;;
67656*)
67657  ECHO_N='-n';;
67658esac
67659
67660rm -f conf$$ conf$$.exe conf$$.file
67661if test -d conf$$.dir; then
67662  rm -f conf$$.dir/conf$$.file
67663else
67664  rm -f conf$$.dir
67665  mkdir conf$$.dir 2>/dev/null
67666fi
67667if (echo >conf$$.file) 2>/dev/null; then
67668  if ln -s conf$$.file conf$$ 2>/dev/null; then
67669    as_ln_s='ln -s'
67670    # ... but there are two gotchas:
67671    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67672    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67673    # In both cases, we have to default to `cp -pR'.
67674    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67675      as_ln_s='cp -pR'
67676  elif ln conf$$.file conf$$ 2>/dev/null; then
67677    as_ln_s=ln
67678  else
67679    as_ln_s='cp -pR'
67680  fi
67681else
67682  as_ln_s='cp -pR'
67683fi
67684rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67685rmdir conf$$.dir 2>/dev/null
67686
67687
67688# as_fn_mkdir_p
67689# -------------
67690# Create "$as_dir" as a directory, including parents if necessary.
67691as_fn_mkdir_p ()
67692{
67693
67694  case $as_dir in #(
67695  -*) as_dir=./$as_dir;;
67696  esac
67697  test -d "$as_dir" || eval $as_mkdir_p || {
67698    as_dirs=
67699    while :; do
67700      case $as_dir in #(
67701      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67702      *) as_qdir=$as_dir;;
67703      esac
67704      as_dirs="'$as_qdir' $as_dirs"
67705      as_dir=`$as_dirname -- "$as_dir" ||
67706$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67707	 X"$as_dir" : 'X\(//\)[^/]' \| \
67708	 X"$as_dir" : 'X\(//\)$' \| \
67709	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67710$as_echo X"$as_dir" |
67711    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67712	    s//\1/
67713	    q
67714	  }
67715	  /^X\(\/\/\)[^/].*/{
67716	    s//\1/
67717	    q
67718	  }
67719	  /^X\(\/\/\)$/{
67720	    s//\1/
67721	    q
67722	  }
67723	  /^X\(\/\).*/{
67724	    s//\1/
67725	    q
67726	  }
67727	  s/.*/./; q'`
67728      test -d "$as_dir" && break
67729    done
67730    test -z "$as_dirs" || eval "mkdir $as_dirs"
67731  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67732
67733
67734} # as_fn_mkdir_p
67735if mkdir -p . 2>/dev/null; then
67736  as_mkdir_p='mkdir -p "$as_dir"'
67737else
67738  test -d ./-p && rmdir ./-p
67739  as_mkdir_p=false
67740fi
67741
67742
67743# as_fn_executable_p FILE
67744# -----------------------
67745# Test if FILE is an executable regular file.
67746as_fn_executable_p ()
67747{
67748  test -f "$1" && test -x "$1"
67749} # as_fn_executable_p
67750as_test_x='test -x'
67751as_executable_p=as_fn_executable_p
67752
67753# Sed expression to map a string onto a valid CPP name.
67754as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67755
67756# Sed expression to map a string onto a valid variable name.
67757as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67758
67759
67760exec 6>&1
67761## ----------------------------------- ##
67762## Main body of $CONFIG_STATUS script. ##
67763## ----------------------------------- ##
67764_ASEOF
67765test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67766
67767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67768# Save the log message, to keep $0 and so on meaningful, and to
67769# report actual input values of CONFIG_FILES etc. instead of their
67770# values after options handling.
67771ac_log="
67772This file was extended by OpenJDK $as_me jdk9, which was
67773generated by GNU Autoconf 2.69.  Invocation command line was
67774
67775  CONFIG_FILES    = $CONFIG_FILES
67776  CONFIG_HEADERS  = $CONFIG_HEADERS
67777  CONFIG_LINKS    = $CONFIG_LINKS
67778  CONFIG_COMMANDS = $CONFIG_COMMANDS
67779  $ $0 $@
67780
67781on `(hostname || uname -n) 2>/dev/null | sed 1q`
67782"
67783
67784_ACEOF
67785
67786case $ac_config_files in *"
67787"*) set x $ac_config_files; shift; ac_config_files=$*;;
67788esac
67789
67790
67791
67792cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67793# Files that config.status was made for.
67794config_files="$ac_config_files"
67795
67796_ACEOF
67797
67798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67799ac_cs_usage="\
67800\`$as_me' instantiates files and other configuration actions
67801from templates according to the current configuration.  Unless the files
67802and actions are specified as TAGs, all are instantiated by default.
67803
67804Usage: $0 [OPTION]... [TAG]...
67805
67806  -h, --help       print this help, then exit
67807  -V, --version    print version number and configuration settings, then exit
67808      --config     print configuration, then exit
67809  -q, --quiet, --silent
67810                   do not print progress messages
67811  -d, --debug      don't remove temporary files
67812      --recheck    update $as_me by reconfiguring in the same conditions
67813      --file=FILE[:TEMPLATE]
67814                   instantiate the configuration file FILE
67815
67816Configuration files:
67817$config_files
67818
67819Report bugs to <build-dev@openjdk.java.net>.
67820OpenJDK home page: <http://openjdk.java.net>."
67821
67822_ACEOF
67823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67824ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67825ac_cs_version="\\
67826OpenJDK config.status jdk9
67827configured by $0, generated by GNU Autoconf 2.69,
67828  with options \\"\$ac_cs_config\\"
67829
67830Copyright (C) 2012 Free Software Foundation, Inc.
67831This config.status script is free software; the Free Software Foundation
67832gives unlimited permission to copy, distribute and modify it."
67833
67834ac_pwd='$ac_pwd'
67835srcdir='$srcdir'
67836AWK='$AWK'
67837test -n "\$AWK" || AWK=awk
67838_ACEOF
67839
67840cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67841# The default lists apply if the user does not specify any file.
67842ac_need_defaults=:
67843while test $# != 0
67844do
67845  case $1 in
67846  --*=?*)
67847    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67848    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67849    ac_shift=:
67850    ;;
67851  --*=)
67852    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67853    ac_optarg=
67854    ac_shift=:
67855    ;;
67856  *)
67857    ac_option=$1
67858    ac_optarg=$2
67859    ac_shift=shift
67860    ;;
67861  esac
67862
67863  case $ac_option in
67864  # Handling of the options.
67865  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67866    ac_cs_recheck=: ;;
67867  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67868    $as_echo "$ac_cs_version"; exit ;;
67869  --config | --confi | --conf | --con | --co | --c )
67870    $as_echo "$ac_cs_config"; exit ;;
67871  --debug | --debu | --deb | --de | --d | -d )
67872    debug=: ;;
67873  --file | --fil | --fi | --f )
67874    $ac_shift
67875    case $ac_optarg in
67876    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67877    '') as_fn_error $? "missing file argument" ;;
67878    esac
67879    as_fn_append CONFIG_FILES " '$ac_optarg'"
67880    ac_need_defaults=false;;
67881  --he | --h |  --help | --hel | -h )
67882    $as_echo "$ac_cs_usage"; exit ;;
67883  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67884  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67885    ac_cs_silent=: ;;
67886
67887  # This is an error.
67888  -*) as_fn_error $? "unrecognized option: \`$1'
67889Try \`$0 --help' for more information." ;;
67890
67891  *) as_fn_append ac_config_targets " $1"
67892     ac_need_defaults=false ;;
67893
67894  esac
67895  shift
67896done
67897
67898ac_configure_extra_args=
67899
67900if $ac_cs_silent; then
67901  exec 6>/dev/null
67902  ac_configure_extra_args="$ac_configure_extra_args --silent"
67903fi
67904
67905_ACEOF
67906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67907if \$ac_cs_recheck; then
67908  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67909  shift
67910  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67911  CONFIG_SHELL='$SHELL'
67912  export CONFIG_SHELL
67913  exec "\$@"
67914fi
67915
67916_ACEOF
67917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67918exec 5>>config.log
67919{
67920  echo
67921  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67922## Running $as_me. ##
67923_ASBOX
67924  $as_echo "$ac_log"
67925} >&5
67926
67927_ACEOF
67928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67929_ACEOF
67930
67931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67932
67933# Handling of arguments.
67934for ac_config_target in $ac_config_targets
67935do
67936  case $ac_config_target in
67937    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67938    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67939    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67940    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67941    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67942
67943  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67944  esac
67945done
67946
67947
67948# If the user did not use the arguments to specify the items to instantiate,
67949# then the envvar interface is used.  Set only those that are not.
67950# We use the long form for the default assignment because of an extremely
67951# bizarre bug on SunOS 4.1.3.
67952if $ac_need_defaults; then
67953  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67954fi
67955
67956# Have a temporary directory for convenience.  Make it in the build tree
67957# simply because there is no reason against having it here, and in addition,
67958# creating and moving files from /tmp can sometimes cause problems.
67959# Hook for its removal unless debugging.
67960# Note that there is a small window in which the directory will not be cleaned:
67961# after its creation but before its name has been assigned to `$tmp'.
67962$debug ||
67963{
67964  tmp= ac_tmp=
67965  trap 'exit_status=$?
67966  : "${ac_tmp:=$tmp}"
67967  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67968' 0
67969  trap 'as_fn_exit 1' 1 2 13 15
67970}
67971# Create a (secure) tmp directory for tmp files.
67972
67973{
67974  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67975  test -d "$tmp"
67976}  ||
67977{
67978  tmp=./conf$$-$RANDOM
67979  (umask 077 && mkdir "$tmp")
67980} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67981ac_tmp=$tmp
67982
67983# Set up the scripts for CONFIG_FILES section.
67984# No need to generate them if there are no CONFIG_FILES.
67985# This happens for instance with `./config.status config.h'.
67986if test -n "$CONFIG_FILES"; then
67987
67988
67989ac_cr=`echo X | tr X '\015'`
67990# On cygwin, bash can eat \r inside `` if the user requested igncr.
67991# But we know of no other shell where ac_cr would be empty at this
67992# point, so we can use a bashism as a fallback.
67993if test "x$ac_cr" = x; then
67994  eval ac_cr=\$\'\\r\'
67995fi
67996ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67997if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67998  ac_cs_awk_cr='\\r'
67999else
68000  ac_cs_awk_cr=$ac_cr
68001fi
68002
68003echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68004_ACEOF
68005
68006
68007{
68008  echo "cat >conf$$subs.awk <<_ACEOF" &&
68009  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68010  echo "_ACEOF"
68011} >conf$$subs.sh ||
68012  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68013ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68014ac_delim='%!_!# '
68015for ac_last_try in false false false false false :; do
68016  . ./conf$$subs.sh ||
68017    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68018
68019  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68020  if test $ac_delim_n = $ac_delim_num; then
68021    break
68022  elif $ac_last_try; then
68023    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68024  else
68025    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68026  fi
68027done
68028rm -f conf$$subs.sh
68029
68030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68031cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68032_ACEOF
68033sed -n '
68034h
68035s/^/S["/; s/!.*/"]=/
68036p
68037g
68038s/^[^!]*!//
68039:repl
68040t repl
68041s/'"$ac_delim"'$//
68042t delim
68043:nl
68044h
68045s/\(.\{148\}\)..*/\1/
68046t more1
68047s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68048p
68049n
68050b repl
68051:more1
68052s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68053p
68054g
68055s/.\{148\}//
68056t nl
68057:delim
68058h
68059s/\(.\{148\}\)..*/\1/
68060t more2
68061s/["\\]/\\&/g; s/^/"/; s/$/"/
68062p
68063b
68064:more2
68065s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68066p
68067g
68068s/.\{148\}//
68069t delim
68070' <conf$$subs.awk | sed '
68071/^[^""]/{
68072  N
68073  s/\n//
68074}
68075' >>$CONFIG_STATUS || ac_write_fail=1
68076rm -f conf$$subs.awk
68077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68078_ACAWK
68079cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68080  for (key in S) S_is_set[key] = 1
68081  FS = ""
68082
68083}
68084{
68085  line = $ 0
68086  nfields = split(line, field, "@")
68087  substed = 0
68088  len = length(field[1])
68089  for (i = 2; i < nfields; i++) {
68090    key = field[i]
68091    keylen = length(key)
68092    if (S_is_set[key]) {
68093      value = S[key]
68094      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68095      len += length(value) + length(field[++i])
68096      substed = 1
68097    } else
68098      len += 1 + keylen
68099  }
68100
68101  print line
68102}
68103
68104_ACAWK
68105_ACEOF
68106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68107if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68108  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68109else
68110  cat
68111fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68112  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68113_ACEOF
68114
68115# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68116# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68117# trailing colons and then remove the whole line if VPATH becomes empty
68118# (actually we leave an empty line to preserve line numbers).
68119if test "x$srcdir" = x.; then
68120  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68121h
68122s///
68123s/^/:/
68124s/[	 ]*$/:/
68125s/:\$(srcdir):/:/g
68126s/:\${srcdir}:/:/g
68127s/:@srcdir@:/:/g
68128s/^:*//
68129s/:*$//
68130x
68131s/\(=[	 ]*\).*/\1/
68132G
68133s/\n//
68134s/^[^=]*=[	 ]*$//
68135}'
68136fi
68137
68138cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68139fi # test -n "$CONFIG_FILES"
68140
68141
68142eval set X "  :F $CONFIG_FILES      "
68143shift
68144for ac_tag
68145do
68146  case $ac_tag in
68147  :[FHLC]) ac_mode=$ac_tag; continue;;
68148  esac
68149  case $ac_mode$ac_tag in
68150  :[FHL]*:*);;
68151  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68152  :[FH]-) ac_tag=-:-;;
68153  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68154  esac
68155  ac_save_IFS=$IFS
68156  IFS=:
68157  set x $ac_tag
68158  IFS=$ac_save_IFS
68159  shift
68160  ac_file=$1
68161  shift
68162
68163  case $ac_mode in
68164  :L) ac_source=$1;;
68165  :[FH])
68166    ac_file_inputs=
68167    for ac_f
68168    do
68169      case $ac_f in
68170      -) ac_f="$ac_tmp/stdin";;
68171      *) # Look for the file first in the build tree, then in the source tree
68172	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68173	 # because $ac_f cannot contain `:'.
68174	 test -f "$ac_f" ||
68175	   case $ac_f in
68176	   [\\/$]*) false;;
68177	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68178	   esac ||
68179	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68180      esac
68181      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68182      as_fn_append ac_file_inputs " '$ac_f'"
68183    done
68184
68185    # Let's still pretend it is `configure' which instantiates (i.e., don't
68186    # use $as_me), people would be surprised to read:
68187    #    /* config.h.  Generated by config.status.  */
68188    configure_input='Generated from '`
68189	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68190	`' by configure.'
68191    if test x"$ac_file" != x-; then
68192      configure_input="$ac_file.  $configure_input"
68193      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68194$as_echo "$as_me: creating $ac_file" >&6;}
68195    fi
68196    # Neutralize special characters interpreted by sed in replacement strings.
68197    case $configure_input in #(
68198    *\&* | *\|* | *\\* )
68199       ac_sed_conf_input=`$as_echo "$configure_input" |
68200       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68201    *) ac_sed_conf_input=$configure_input;;
68202    esac
68203
68204    case $ac_tag in
68205    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68206      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68207    esac
68208    ;;
68209  esac
68210
68211  ac_dir=`$as_dirname -- "$ac_file" ||
68212$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68213	 X"$ac_file" : 'X\(//\)[^/]' \| \
68214	 X"$ac_file" : 'X\(//\)$' \| \
68215	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68216$as_echo X"$ac_file" |
68217    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68218	    s//\1/
68219	    q
68220	  }
68221	  /^X\(\/\/\)[^/].*/{
68222	    s//\1/
68223	    q
68224	  }
68225	  /^X\(\/\/\)$/{
68226	    s//\1/
68227	    q
68228	  }
68229	  /^X\(\/\).*/{
68230	    s//\1/
68231	    q
68232	  }
68233	  s/.*/./; q'`
68234  as_dir="$ac_dir"; as_fn_mkdir_p
68235  ac_builddir=.
68236
68237case "$ac_dir" in
68238.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68239*)
68240  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68241  # A ".." for each directory in $ac_dir_suffix.
68242  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68243  case $ac_top_builddir_sub in
68244  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68245  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68246  esac ;;
68247esac
68248ac_abs_top_builddir=$ac_pwd
68249ac_abs_builddir=$ac_pwd$ac_dir_suffix
68250# for backward compatibility:
68251ac_top_builddir=$ac_top_build_prefix
68252
68253case $srcdir in
68254  .)  # We are building in place.
68255    ac_srcdir=.
68256    ac_top_srcdir=$ac_top_builddir_sub
68257    ac_abs_top_srcdir=$ac_pwd ;;
68258  [\\/]* | ?:[\\/]* )  # Absolute name.
68259    ac_srcdir=$srcdir$ac_dir_suffix;
68260    ac_top_srcdir=$srcdir
68261    ac_abs_top_srcdir=$srcdir ;;
68262  *) # Relative name.
68263    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68264    ac_top_srcdir=$ac_top_build_prefix$srcdir
68265    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68266esac
68267ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68268
68269
68270  case $ac_mode in
68271  :F)
68272  #
68273  # CONFIG_FILE
68274  #
68275
68276_ACEOF
68277
68278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68279# If the template does not know about datarootdir, expand it.
68280# FIXME: This hack should be removed a few years after 2.60.
68281ac_datarootdir_hack=; ac_datarootdir_seen=
68282ac_sed_dataroot='
68283/datarootdir/ {
68284  p
68285  q
68286}
68287/@datadir@/p
68288/@docdir@/p
68289/@infodir@/p
68290/@localedir@/p
68291/@mandir@/p'
68292case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68293*datarootdir*) ac_datarootdir_seen=yes;;
68294*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68295  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68296$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68297_ACEOF
68298cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68299  ac_datarootdir_hack='
68300  s&@datadir@&$datadir&g
68301  s&@docdir@&$docdir&g
68302  s&@infodir@&$infodir&g
68303  s&@localedir@&$localedir&g
68304  s&@mandir@&$mandir&g
68305  s&\\\${datarootdir}&$datarootdir&g' ;;
68306esac
68307_ACEOF
68308
68309# Neutralize VPATH when `$srcdir' = `.'.
68310# Shell code in configure.ac might set extrasub.
68311# FIXME: do we really want to maintain this feature?
68312cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68313ac_sed_extra="$ac_vpsub
68314$extrasub
68315_ACEOF
68316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68317:t
68318/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68319s|@configure_input@|$ac_sed_conf_input|;t t
68320s&@top_builddir@&$ac_top_builddir_sub&;t t
68321s&@top_build_prefix@&$ac_top_build_prefix&;t t
68322s&@srcdir@&$ac_srcdir&;t t
68323s&@abs_srcdir@&$ac_abs_srcdir&;t t
68324s&@top_srcdir@&$ac_top_srcdir&;t t
68325s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68326s&@builddir@&$ac_builddir&;t t
68327s&@abs_builddir@&$ac_abs_builddir&;t t
68328s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68329$ac_datarootdir_hack
68330"
68331eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68332  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68333
68334test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68335  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68336  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68337      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68338  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68339which seems to be undefined.  Please make sure it is defined" >&5
68340$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68341which seems to be undefined.  Please make sure it is defined" >&2;}
68342
68343  rm -f "$ac_tmp/stdin"
68344  case $ac_file in
68345  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68346  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68347  esac \
68348  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68349 ;;
68350
68351
68352
68353  esac
68354
68355done # for ac_tag
68356
68357
68358as_fn_exit 0
68359_ACEOF
68360ac_clean_files=$ac_clean_files_save
68361
68362test $ac_write_fail = 0 ||
68363  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68364
68365
68366# configure is writing to config.log, and then calls config.status.
68367# config.status does its own redirection, appending to config.log.
68368# Unfortunately, on DOS this fails, as config.log is still kept open
68369# by configure, so config.status won't be able to write to it; its
68370# output is simply discarded.  So we exec the FD to /dev/null,
68371# effectively closing config.log, so it can be properly (re)opened and
68372# appended to by config.status.  When coming back to configure, we
68373# need to make the FD available again.
68374if test "$no_create" != yes; then
68375  ac_cs_success=:
68376  ac_config_status_args=
68377  test "$silent" = yes &&
68378    ac_config_status_args="$ac_config_status_args --quiet"
68379  exec 5>/dev/null
68380  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68381  exec 5>>config.log
68382  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68383  # would make configure fail if this is the last instruction.
68384  $ac_cs_success || as_fn_exit 1
68385fi
68386if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68387  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68388$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68389fi
68390
68391
68392# After AC_OUTPUT, we need to do final work
68393
68394
68395  # Try to move config.log (generated by autoconf) to the configure-support directory.
68396  if test -e ./config.log; then
68397    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68398  fi
68399
68400  # Rotate our log file (configure.log)
68401  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68402    $RM -f "$OUTPUT_ROOT/configure.log.old"
68403  fi
68404  if test -e "$OUTPUT_ROOT/configure.log"; then
68405    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68406  fi
68407
68408  # Move configure.log from current directory to the build output root
68409  if test -e ./configure.log; then
68410    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68411  fi
68412
68413  # Make the compare script executable
68414  $CHMOD +x $OUTPUT_ROOT/compare.sh
68415
68416
68417# Finally output some useful information to the user
68418
68419  # Finally output some useful information to the user
68420
68421  printf "\n"
68422  printf "====================================================\n"
68423  if test "x$no_create" != "xyes"; then
68424    if test "x$IS_RECONFIGURE" != "xyes"; then
68425      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68426    else
68427      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68428    fi
68429  else
68430    if test "x$IS_RECONFIGURE" != "xyes"; then
68431      printf "A configuration has been successfully checked but not created\n"
68432    else
68433      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68434    fi
68435  fi
68436  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68437    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68438  else
68439    printf "using default settings.\n"
68440  fi
68441
68442  printf "\n"
68443  printf "Configuration summary:\n"
68444  printf "* Debug level:    $DEBUG_LEVEL\n"
68445  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68446  printf "* JDK variant:    $JDK_VARIANT\n"
68447  printf "* JVM variants:   $JVM_VARIANTS\n"
68448  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68449  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68450
68451  printf "\n"
68452  printf "Tools summary:\n"
68453  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68454    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68455  fi
68456  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68457  if test "x$TOOLCHAIN_VERSION" != "x"; then
68458    print_version=" $TOOLCHAIN_VERSION"
68459  fi
68460  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68461  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68462  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68463
68464  printf "\n"
68465  printf "Build performance summary:\n"
68466  printf "* Cores to use:   $JOBS\n"
68467  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68468  if test "x$CCACHE_STATUS" != "x"; then
68469    printf "* ccache status:  $CCACHE_STATUS\n"
68470  fi
68471  printf "\n"
68472
68473  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68474    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68475    printf "will result in longer build times.\n"
68476    printf "\n"
68477  fi
68478
68479  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68480    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68481    printf "These are not respected, and will be ignored. It is recommended\n"
68482    printf "that you clean your environment. The following variables are set:\n"
68483    printf "$FOUND_ALT_VARIABLES\n"
68484    printf "\n"
68485  fi
68486
68487  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68488    printf "WARNING: Your build output directory is not on a local disk.\n"
68489    printf "This will severely degrade build performance!\n"
68490    printf "It is recommended that you create an output directory on a local disk,\n"
68491    printf "and run the configure script again from that directory.\n"
68492    printf "\n"
68493  fi
68494
68495  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68496    printf "WARNING: The result of this configuration has overridden an older\n"
68497    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68498    printf "proper build. Failure to do so might result in strange build problems.\n"
68499    printf "\n"
68500  fi
68501
68502  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68503    printf "WARNING: The result of this configuration was not saved.\n"
68504    printf "You should run without '--no-create | -n' to create the configuration.\n"
68505    printf "\n"
68506  fi
68507
68508
68509
68510  # Locate config.log.
68511  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68512    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68513  elif test -e "./config.log"; then
68514    CONFIG_LOG_PATH="."
68515  fi
68516
68517  if test -e "$CONFIG_LOG_PATH/config.log"; then
68518    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68519    if test $? -eq 0; then
68520      printf "The following warnings were produced. Repeated here for convenience:\n"
68521      # We must quote sed expression (using []) to stop m4 from eating the [].
68522      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68523      printf "\n"
68524    fi
68525  fi
68526
68527